| 1 | diff -u -r ../fish-2.6.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py |
| 2 | --- ../fish-2.6.0/share/tools/create_manpage_completions.py 2017-06-03 14:45:13.000000000 +0200 |
| 3 | +++ ./share/tools/create_manpage_completions.py 2017-06-05 21:27:41.796125049 +0200 |
| 4 | @@ -862,22 +862,7 @@ |
| 5 | if os.getenv("MANPATH"): |
| 6 | parent_paths = os.getenv("MANPATH").strip().split(':') |
| 7 | else: |
| 8 | - # Some systems have manpath, others have `man --path` (like Haiku). |
| 9 | - # TODO: Deal with systems that have neither (OpenBSD) |
| 10 | - for prog in [['manpath'], ['man', '--path']]: |
| 11 | - try: |
| 12 | - proc = subprocess.Popen(prog, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 13 | - except OSError: # Command does not exist, keep trying |
| 14 | - continue |
| 15 | - break # Command exists, use it. |
| 16 | - manpath, err_data = proc.communicate() |
| 17 | - parent_paths = manpath.decode().strip().split(':') |
| 18 | - if (not parent_paths) or (proc and proc.returncode > 0): |
| 19 | - # HACK: Use some fallback in case we can't get anything else. |
| 20 | - # `mandoc` does not provide `manpath` or `man --path` and $MANPATH might not be set, so just use the default for mandoc (minus /usr/X11R6/man, because that's not relevant). |
| 21 | - # The alternative is reading its config file (/etc/man.conf) |
| 22 | - sys.stderr.write("Unable to get the manpath, falling back to /usr/share/man:/usr/local/share/man. Please set $MANPATH if that is not correct.\n") |
| 23 | - parent_paths = ["/usr/share/man", "/usr/local/share/man"] |
| 24 | + parent_paths = ["@TERMUX_PREFIX@/share/man"] |
| 25 | result = [] |
| 26 | for parent_path in parent_paths: |
| 27 | for section in ['man1', 'man6', 'man8']: |