fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerExtract workaround for calling man/apropos without manpagerd3c3dfda7

master
2.2 KiB44 linesraw
1complete -xc man -a "(__fish_complete_man)"
2
3complete -xc man -n 'not __fish_complete_man' -a 1 -d 'Program section'
4complete -xc man -n 'not __fish_complete_man' -a 2 -d 'Syscall section'
5complete -xc man -n 'not __fish_complete_man' -a 3 -d 'Library section'
6complete -xc man -n 'not __fish_complete_man' -a 4 -d 'Device section'
7complete -xc man -n 'not __fish_complete_man' -a 5 -d 'File format section'
8complete -xc man -n 'not __fish_complete_man' -a 6 -d 'Games section'
9complete -xc man -n 'not __fish_complete_man' -a 7 -d 'Misc section'
10complete -xc man -n 'not __fish_complete_man' -a 8 -d 'Admin section'
11complete -xc man -n 'not __fish_complete_man' -a 9 -d 'Kernel section'
12complete -xc man -n 'not __fish_complete_man' -a tcl -d 'Tcl section'
13complete -xc man -n 'not __fish_complete_man' -a n -d 'New section'
14complete -xc man -n 'not __fish_complete_man' -a l -d 'Local section'
15complete -xc man -n 'not __fish_complete_man' -a p
16complete -xc man -n 'not __fish_complete_man' -a o -d 'Old section'
17
18complete -rc man -s C -d "Configuration file"
19complete -xc man -s M -a "(__fish_complete_directories (commandline -ct))" -d Manpath
20complete -rc man -s P -d Pager
21complete -xc man -s S -d "Manual sections"
22complete -c man -s a -d "Display all matches"
23complete -c man -s c -d "Always reformat"
24complete -c man -s d -d Debug
25complete -c man -s D -d "Debug and run"
26complete -c man -s f -d "Show whatis information"
27complete -c man -s F -l preformat -d "Format only"
28complete -c man -s h -d "Display help and exit"
29complete -c man -s k -d "Show apropos information"
30complete -c man -s K -d "Search in all man pages"
31complete -xc man -s m -d "Set system"
32complete -xc man -s p -d Preprocessors
33complete -c man -s t -d "Format for printing"
34complete -c man -s w -l path -d "Only print locations"
35complete -c man -s W -d "Only print locations"
36
37complete -c man -n 'string match -q -- "*/*" (commandline -t | string collect)' --force-files
38if command -q man
39    # We have a conditionally-defined man function,
40    # so we need to check for existence here.
41    if echo | __fish_without_manpager command man -l - &>/dev/null
42        complete -c man -s l -l local-file -d "Local file" -r
43    end
44end