mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 08:27:26 +00:00
Handle missing groff macro in __fish_print_help
The Xcode installation of Fish is missing the groff macro used by `__fish_print_help`. This caused e.g. `status -h` to stop working. Fixes #4058.
This commit is contained in:
parent
4ff002b9fb
commit
9bc1b44b0d
1 changed files with 6 additions and 2 deletions
|
@ -40,10 +40,14 @@ function __fish_print_help --description "Print help message for the specified f
|
||||||
set rLL -rLL=$cols[1]n
|
set rLL -rLL=$cols[1]n
|
||||||
end
|
end
|
||||||
set -lx GROFF_TMAC_PATH $__fish_datadir/groff
|
set -lx GROFF_TMAC_PATH $__fish_datadir/groff
|
||||||
|
set -l mfish
|
||||||
|
if test -e $GROFF_TMAC_PATH/fish.tmac
|
||||||
|
set mfish -mfish
|
||||||
|
end
|
||||||
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)
|
||||||
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
|
||||||
|
|
||||||
# The original implementation trimmed off the top 5 lines and bottom 3 lines
|
# The original implementation trimmed off the top 5 lines and bottom 3 lines
|
||||||
|
|
Loading…
Reference in a new issue