diff --git a/Makefile.in b/Makefile.in index adea719c5..243d8fde4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -650,6 +650,7 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions + $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/groff $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1 $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config @@ -674,6 +675,7 @@ install-force: all install-translations | show-datadir show-sysconfdir show-extr $(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/functions/; \ done; @echo "Installing $(bo)man pages$(sgr0)"; + $v $(INSTALL) -m 644 share/groff/* $(DESTDIR)$(datadir)/fish/groff/ $v for i in $(wildcard share/man/man1/*.1); do \ $(INSTALL) -m 644 $$i $(DESTDIR)$(datadir)/fish/man/man1/; \ done; diff --git a/share/functions/__fish_print_help.fish b/share/functions/__fish_print_help.fish index 265f96159..31190e552 100644 --- a/share/functions/__fish_print_help.fish +++ b/share/functions/__fish_print_help.fish @@ -39,10 +39,11 @@ function __fish_print_help --description "Print help message for the specified f set cols (math $cols - 4) # leave a bit of space on the right set rLL -rLL=$cols[1]n end + set -lx GROFF_TMAC_PATH $__fish_datadir/groff if test -e "$__fish_datadir/man/man1/$item.1" - set help (nroff -man -c -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" - set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -man -c -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 # The original implementation trimmed off the top 5 lines and bottom 3 lines diff --git a/share/groff/fish.tmac b/share/groff/fish.tmac new file mode 100644 index 000000000..cf8dbe8fa --- /dev/null +++ b/share/groff/fish.tmac @@ -0,0 +1,14 @@ +.\" This is needed on systems that ship with groff versions older than 1.20; +.\" such as macOS up thru Sierra (10.12). See fish issue #2673. +.\" +.\" For UTF-8, map some characters conservatively for the sake +.\" of easy cut and paste. +. +.if '\*[.T]'utf8' \{\ +. rchar \- - ' ` +. +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char ` \N'96' +.\}