termux-packages/packages/fish/create_manpage_completions....

23 lines
1.2 KiB
Diff
Raw Normal View History

2020-02-15 23:17:20 +01:00
diff -u -r ../fish-3.1.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py
--- ../fish-3.1.0/share/tools/create_manpage_completions.py 2020-02-12 14:04:07.000000000 +0000
+++ ./share/tools/create_manpage_completions.py 2020-02-15 21:40:21.963831000 +0000
@@ -953,17 +953,7 @@
2017-06-05 21:32:37 +02:00
if os.getenv("MANPATH"):
2020-02-15 23:17:20 +01:00
parent_paths = os.getenv("MANPATH").strip().split(":")
2017-06-05 21:32:37 +02:00
else:
- # Some systems have manpath, others have `man --path` (like Haiku).
2020-02-15 23:17:20 +01:00
- for prog in [["manpath"], ["man", "--path"]]:
2017-06-05 21:32:37 +02:00
- try:
2020-02-15 23:17:20 +01:00
- proc = subprocess.Popen(
- prog, stdout=subprocess.PIPE, stderr=subprocess.PIPE
- )
- except OSError: # Command does not exist, keep trying
2017-06-05 21:32:37 +02:00
- continue
2020-02-15 23:17:20 +01:00
- break # Command exists, use it.
2017-06-05 21:32:37 +02:00
- manpath, err_data = proc.communicate()
2020-02-15 23:17:20 +01:00
- parent_paths = manpath.decode().strip().split(":")
2017-06-05 21:32:37 +02:00
+ parent_paths = ["@TERMUX_PREFIX@/share/man"]
2020-02-15 23:17:20 +01:00
if (not parent_paths) or (proc and proc.returncode > 0):
# HACK: Use some fallbacks in case we can't get anything else.
# `mandoc` does not provide `manpath` or `man --path` and $MANPATH might not be set.