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
|
|
|
|
|
2006-01-11 22:17:35 +08:00
|
|
|
complete -xc apropos -a '(__fish_complete_apropos)' -d (_ "whatis entry")
|
2005-09-20 21:31:55 +08:00
|
|
|
|
2006-01-08 10:56:56 +08:00
|
|
|
complete -c apropos -s h -l help -d (_ "Display help and exit")
|
|
|
|
complete -f -c apropos -s d -l debug -d (_ "Print debugging info")
|
2006-01-09 22:47:30 +08:00
|
|
|
complete -f -c apropos -s v -l verbose -d (_ "Verbose mode")
|
2006-01-08 10:56:56 +08:00
|
|
|
complete -f -c apropos -s r -l regex -d (_ "Keyword as regex")
|
2006-02-14 05:36:59 +08:00
|
|
|
complete -f -c apropos -s w -l wildcard -d (_ "Keyword as wildcards")
|
2006-01-08 10:56:56 +08:00
|
|
|
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")
|
|
|
|
complete -x -c apropos -s M -l manpath -a '(echo $MANPATH)' -d (_ "Specify man path")
|
2006-01-11 22:17:35 +08:00
|
|
|
complete -x -c apropos -s C -l config-file -d (_ "Specify a configuration file")
|
2006-01-08 10:56:56 +08:00
|
|
|
complete -f -c apropos -s V -l version -d (_ "Display version and exit")
|
2005-09-20 21:31:55 +08:00
|
|
|
|