File: __fish_complete_command.fish

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (13 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# localization: skip(private)
function __fish_complete_command --description 'Complete using all available commands'
    set -l ctoken "$(commandline -ct)"
    switch $ctoken
        case '*=*'
            set ctoken (string split "=" -- $ctoken)
            complete -C "$ctoken[2]"
        case '-*' # do not try to complete options as commands
            return
        case '*'
            complete -C "$ctoken"
    end
end