mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-25 03:03:58 +08:00
b03327f5d2
This was already supposed to handle `--foo=bar<TAB>` cases, except it printed the `--foo=` again, causing fish to take that as part of the token. See #9538 for a similar thing with __fish_complete_directories. Fixes #10011
13 lines
396 B
Fish
13 lines
396 B
Fish
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
|