mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-12 07:57:22 +00:00
Drop fuction from man completion file, already lives in it's own file
darcs-hash:20060215024822-ac50b-dbb1e3769f0b3101f634d4bf5f5e530aacc1dfda.gz
This commit is contained in:
parent
e58110da2c
commit
1c2d3583e7
1 changed files with 0 additions and 28 deletions
|
@ -1,32 +1,4 @@
|
|||
|
||||
function __fish_complete_man
|
||||
if test (commandline -ct)
|
||||
|
||||
# Try to guess what section to search in. If we don't know, we
|
||||
# use [^)]*, which should match any section
|
||||
|
||||
set section ""
|
||||
set prev (commandline -poc)
|
||||
set -e prev[1]
|
||||
while count $prev
|
||||
switch $prev[1]
|
||||
case '-**'
|
||||
|
||||
case '*'
|
||||
set section $prev[1]
|
||||
end
|
||||
set -e prev[1]
|
||||
end
|
||||
|
||||
set section $section"[^)]*"
|
||||
|
||||
# Do the actual search
|
||||
apropos (commandline -ct) | grep \^(commandline -ct) | sed -n -e 's/\([^ ]*\).*(\('$section'\)) *- */\1\t\2: /p'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
complete -xc man -a "(__fish_complete_man)"
|
||||
|
||||
complete -xc man -a 1 -d (_ "Program section")
|
||||
|
|
Loading…
Reference in a new issue