2005-09-20 13:31:55 +00:00
|
|
|
function __fish_complete_apropos
|
2019-05-05 10:53:09 +00:00
|
|
|
if test (commandline -ct)
|
2020-05-15 05:56:06 +00:00
|
|
|
switch (commandline -ct)
|
2020-03-21 13:47:36 +00:00
|
|
|
case '-**'
|
|
|
|
|
|
|
|
case '*'
|
|
|
|
apropos $str 2>/dev/null | string replace -rf -- "^(.*$str([^ ]*).*)" "$str\$2\t\$1"
|
|
|
|
end
|
2019-05-05 10:53:09 +00:00
|
|
|
end
|
2005-09-20 13:31:55 +00:00
|
|
|
end
|
|
|
|
|
2017-10-11 17:17:35 +00:00
|
|
|
complete -xc apropos -a '(__fish_complete_apropos)' -d "whatis entry"
|
2005-09-20 13:31:55 +00:00
|
|
|
|
2020-03-21 13:47:36 +00:00
|
|
|
complete -f -c apropos -s '?' -l help -d "Display help and exit"
|
|
|
|
complete -f -c apropos -l usage -d "Display short usage message"
|
2017-10-11 17:17:35 +00:00
|
|
|
complete -f -c apropos -s d -l debug -d "Print debugging info"
|
|
|
|
complete -f -c apropos -s v -l verbose -d "Verbose mode"
|
2020-03-21 13:47:36 +00:00
|
|
|
complete -f -c apropos -s r -l regex -d "Keyword as regex (default)"
|
2017-10-11 17:17:35 +00:00
|
|
|
complete -f -c apropos -s w -l wildcard -d "Keyword as wildcards"
|
|
|
|
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"
|
2020-03-21 13:47:36 +00:00
|
|
|
complete -x -c apropos -s M -l manpath -a "(__fish_complete_directories (commandline -ct))" -d Manpath
|
|
|
|
complete -r -c apropos -s C -l config-file -d "Specify a configuration file"
|
2017-10-11 17:17:35 +00:00
|
|
|
complete -f -c apropos -s V -l version -d "Display version and exit"
|
2020-03-21 13:47:36 +00:00
|
|
|
complete -f -c apropos -s a -l and -d "Match all keywords"
|
|
|
|
complete -f -c apropos -s l -l long -d "Do not trim output to terminal width"
|
|
|
|
complete -x -c apropos -s s -l sections -l section -d "Search only these sections (colon-separated)"
|
|
|
|
complete -x -c apropos -s L -l locale -a "(command -sq locale; and locale -a)" -d "Set locale"
|