mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-01 23:24:21 +08:00
57bd21e7ce
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
(cherry picked from commit b03327f5d2
)
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
|