fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
0b414b966
master
1# localization: skip(private) 2function __fish_print_help --description"Print help for the specified fish function or builtin" 3if not type -q man 4fish_command_not_found man 5return 1 6end 7 8set -l item( __fish_canonicalize_builtin $argv [ 1 ]) 9 10function __fish_print_help_man -V item -a man1 11if not path is$man1 12# Trigger the "documentation not be installed" message. Currently 13# only when called from core. 14return 2 15end 16set -l args -l( path filter --$man1 /$item .1$man1 /$item .1.gz)[ 1 ] 17# Work around macOS/FreeBSD man not supporting -l yet (only mandoc really needs it). 18if not __fish_without_manpager command man -l$args [ 2 ] &> /dev/null 19set -e args[ 1 ] 20end 21command man$args 22end 23__fish_data_with_directory man/man1\ 24"$ ( string escape --style=regex $item .1 ) (?:\.gz)?" \ 25 __fish_print_help_man 26__fish_with_status functions --erase __fish_print_help_man 27end