fork/fish-shell

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

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
438 B15 linesraw
1# localization: skip(private)
2# Returns whether we *should* complete a -s or --long argument.
3# The preference is NOT to do so, i.e. prefer subcommands over switches.
4function __fish_should_complete_switches
5    for arg in (commandline -ct)[-1..1]
6        if not string match -qr -- "^-\S*\$" "$arg"
7            return 1
8        end
9    end
10    if string match -qr -- "^-" (commandline -ct)[-1]
11        return 0
12    end
13
14    return 1
15end