mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:59:27 +08:00
__fish_complete_command: Fix --foo= logic
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
This commit is contained in:
parent
fc95eca257
commit
b03327f5d2
|
@ -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 '*'
|
||||
|
|
|
@ -548,3 +548,7 @@ complete -C'dotty '
|
|||
# CHECK: .abc
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user