fish-shell/share/functions/__fish_is_switch.fish
Mahmoud Al-Qudsi 1288877033 Update yarn completions
Don't attempt to complete against package names if the user is trying to
enter a switch to speed things up.

Also work around #5267 by not wrapping unfiltered `all-the-package-name`
calls in a function.
2018-10-29 13:56:40 -05:00

5 lines
123 B
Fish

# Whether or not the current token is a switch
function __fish_is_switch
string match -qr -- '^-' ""(commandline -ct)
end