2005-11-02 16:49:13 +00:00
|
|
|
|
2005-09-20 13:31:55 +00:00
|
|
|
function __fish_complete_apropos
|
|
|
|
if test (commandline -ct)
|
|
|
|
set str (commandline -ct)
|
2015-07-16 13:22:49 +00:00
|
|
|
apropos $str ^/dev/null |sed -e "s/^\(.*$str\([^ ]*\).*\)\$/$str\2"\t"\1/"
|
2005-09-20 13:31:55 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2007-01-16 01:18:28 +00:00
|
|
|
complete -xc apropos -a '(__fish_complete_apropos)' --description "whatis entry"
|
2005-09-20 13:31:55 +00:00
|
|
|
|
2007-01-16 01:18:28 +00: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 13:31:55 +00:00
|
|
|
|