diff --git a/share/functions/__fish_complete_command.fish b/share/functions/__fish_complete_command.fish index ddbfb0273..875d72d23 100644 --- a/share/functions/__fish_complete_command.fish +++ b/share/functions/__fish_complete_command.fish @@ -3,7 +3,7 @@ function __fish_complete_command --description 'Complete using all available com switch $ctoken case '*=*' set ctoken (string split "=" -- $ctoken) - printf '%s\n' $ctoken[1]=(complete -C "$ctoken[2]") + complete -C "$ctoken[2]" case '-*' # do not try to complete options as commands return case '*' diff --git a/tests/checks/complete.fish b/tests/checks/complete.fish index 1d40c84c7..79ef35f4c 100644 --- a/tests/checks/complete.fish +++ b/tests/checks/complete.fish @@ -532,3 +532,7 @@ begin end rm -r $tmpdir + +complete -C'complete --command=fish' | head -n 1 | string replace -rf '\t.*' '' +# (one "--command=" is okay, we used to get "--command=--command=" +# CHECK: --command=fish