2005-11-03 00:49:13 +08:00
|
|
|
|
2005-09-20 21:31:55 +08:00
|
|
|
function __fish_complete_apropos
|
|
|
|
if test (commandline -ct)
|
|
|
|
set str (commandline -ct)
|
2015-07-16 21:22:49 +08:00
|
|
|
apropos $str ^/dev/null |sed -e "s/^\(.*$str\([^ ]*\).*\)\$/$str\2"\t"\1/"
|
2005-09-20 21:31:55 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2007-01-16 09:18:28 +08:00
|
|
|
complete -xc apropos -a '(__fish_complete_apropos)' --description "whatis entry"
|
2005-09-20 21:31:55 +08:00
|
|
|
|
2007-01-16 09:18:28 +08:00
|
|
|
complete -c apropos -s h -l help --description "Display help and exit"
|
|
|
|
complete -f -c apropos -s d -l debug --description "Print debugging info"
|
|
|
|
complete -f -c apropos -s v -l verbose --description "Verbose mode"
|
|
|
|
complete -f -c apropos -s r -l regex --description "Keyword as regex"
|
|
|
|
complete -f -c apropos -s w -l wildcard --description "Keyword as wildcards"
|
|
|
|
complete -f -c apropos -s e -l exact --description "Keyword as exactly match"
|
|
|
|
complete -x -c apropos -s m -l system --description "Search for other system"
|
|
|
|
complete -x -c apropos -s M -l manpath -a '(echo $MANPATH)' --description "Specify man path"
|
|
|
|
complete -x -c apropos -s C -l config-file --description "Specify a configuration file"
|
|
|
|
complete -f -c apropos -s V -l version --description "Display version and exit"
|
2005-09-20 21:31:55 +08:00
|
|
|
|