Fredrik Fornwall
8 years ago
3 changed files with 36 additions and 26 deletions
@ -1,17 +1,27 @@ |
|||
diff -u -r ../fish-2.4.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py
|
|||
--- ../fish-2.4.0/share/tools/create_manpage_completions.py 2016-11-07 22:20:54.000000000 -0500
|
|||
+++ ./share/tools/create_manpage_completions.py 2016-12-23 15:09:00.703224799 -0500
|
|||
@@ -857,12 +857,7 @@
|
|||
def get_paths_from_manpath(): |
|||
# Return all the paths to man(1) and man(8) files in the manpath |
|||
import subprocess, os |
|||
- proc = subprocess.Popen(['manpath'], stdout=subprocess.PIPE)
|
|||
diff -u -r ../fish-2.6.0/share/tools/create_manpage_completions.py ./share/tools/create_manpage_completions.py
|
|||
--- ../fish-2.6.0/share/tools/create_manpage_completions.py 2017-06-03 14:45:13.000000000 +0200
|
|||
+++ ./share/tools/create_manpage_completions.py 2017-06-05 21:27:41.796125049 +0200
|
|||
@@ -862,22 +862,7 @@
|
|||
if os.getenv("MANPATH"): |
|||
parent_paths = os.getenv("MANPATH").strip().split(':') |
|||
else: |
|||
- # Some systems have manpath, others have `man --path` (like Haiku).
|
|||
- # TODO: Deal with systems that have neither (OpenBSD)
|
|||
- for prog in [['manpath'], ['man', '--path']]:
|
|||
- try:
|
|||
- proc = subprocess.Popen(prog, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|||
- except OSError: # Command does not exist, keep trying
|
|||
- continue
|
|||
- break # Command exists, use it.
|
|||
- manpath, err_data = proc.communicate()
|
|||
- parent_paths = manpath.decode().strip().split(':')
|
|||
- if not parent_paths:
|
|||
- sys.stderr.write("Unable to get the manpath (tried manpath)\n")
|
|||
- sys.exit(-1)
|
|||
+ parent_paths = ['@TERMUX_PREFIX@/share/man']
|
|||
- if (not parent_paths) or (proc and proc.returncode > 0):
|
|||
- # HACK: Use some fallback in case we can't get anything else.
|
|||
- # `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).
|
|||
- # The alternative is reading its config file (/etc/man.conf)
|
|||
- 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")
|
|||
- parent_paths = ["/usr/share/man", "/usr/local/share/man"]
|
|||
+ parent_paths = ["@TERMUX_PREFIX@/share/man"]
|
|||
result = [] |
|||
for parent_path in parent_paths: |
|||
for section in ['man1', 'man6', 'man8']: |
|||
|
@ -1,19 +1,20 @@ |
|||
--- ./share/functions/__fish_print_help.fish 2017-02-03 07:16:58.000000000 +0530
|
|||
+++ ../__fish_print_help.fish 2017-02-12 11:36:23.477232262 +0530
|
|||
@@ -41,7 +41,7 @@
|
|||
diff -u -r ../fish-2.6.0/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish
|
|||
--- ../fish-2.6.0/share/functions/__fish_print_help.fish 2017-06-03 14:45:13.000000000 +0200
|
|||
+++ ./share/functions/__fish_print_help.fish 2017-06-05 21:29:51.794696261 +0200
|
|||
@@ -45,7 +45,7 @@
|
|||
set mfish -mfish |
|||
end |
|||
set -lx GROFF_TMAC_PATH $__fish_datadir/groff |
|||
if test -e "$__fish_datadir/man/man1/$item.1" |
|||
- set help (nroff -c -man -mfish -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
|||
+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null))
|
|||
- set help (nroff -c -man $mfish -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
|||
+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
|||
else if test -e "$__fish_datadir/man/man1/$item.1.gz" |
|||
set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -c -man -mfish -t $rLL ^/dev/null) |
|||
set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -c -man $mfish -t $rLL ^/dev/null) |
|||
end |
|||
@@ -99,6 +99,6 @@
|
|||
@@ -103,6 +103,6 @@
|
|||
# skip it |
|||
end |
|||
end |
|||
- end | ul # post-process with `ul`, to interpret the old-style grotty escapes
|
|||
+ end # post-process with `ul`, to interpret the old-style grotty escapes
|
|||
+ end
|
|||
echo # print a trailing blank line |
|||
end |
|||
|
Loading…
Reference in new issue