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)
|
2005-11-03 00:49:13 +08:00
|
|
|
apropos $str|sed -e "s/^\(.*$str\([^ ]*\).*\)$/$str\2\t\1/"
|
2005-09-20 21:31:55 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2005-11-03 00:49:13 +08:00
|
|
|
complete -xc apropos -a '(__fish_complete_apropos)' -d "Whatis entry"
|
2005-09-20 21:31:55 +08:00
|
|
|
|
|
|
|
complete -c apropos -s h -l help -d "apropos command help"
|
|
|
|
complete -f -c apropos -s d -l debug -d "print debugging info"
|
|
|
|
complete -f -c apropos -s v -l verbose -d "print verbose warning"
|
|
|
|
complete -f -c apropos -s r -l regex -d "keyword as regex"
|
|
|
|
complete -f -c apropos -s w -l wildcard -d "keyword as wildwards"
|
|
|
|
complete -f -c apropos -s e -l exact -d "keyword as exactly match"
|
|
|
|
complete -x -c apropos -s m -l system -d "search for other system"
|
2005-11-03 00:49:13 +08:00
|
|
|
complete -x -c apropos -s M -l manpath -a '(echo $MANPATH)' -d "specify man path"
|
2005-09-20 21:31:55 +08:00
|
|
|
complete -x -c apropos -s C -l config-file -d "specify a conf file"
|
|
|
|
complete -f -c apropos -s V -l version -d "Display version"
|
|
|
|
|