mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 21:43:55 +08:00
13 lines
313 B
Fish
13 lines
313 B
Fish
|
# Returns whether we *should* complete a -s or --long argument.
|
||
|
# The preference is NOT to do so, i.e. prefer subcommands over switches.
|
||
|
function __fish_should_complete_switches
|
||
|
if not __fish_can_complete_switches
|
||
|
return 1
|
||
|
end
|
||
|
if string match -qr -- "^-" (commandline -ct)[-1]
|
||
|
return 0
|
||
|
end
|
||
|
|
||
|
return 1
|
||
|
end
|