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