Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.28k stars 94 forks source link

[BUG] Completing multiple selections inbetween tokens inserts spaces wrongly #352

Open oddlama opened 1 year ago

oddlama commented 1 year ago

Description & Steps to Reproduce

I sometimes try to insert new options before existing tokens such as files that i already wrote:

any_command --somearg --<Tab> FILE1 FILE2

If you select a single entry in this szenario, everything is fine and the result is

any_command --somearg --yourselection FILE1 FILE2

But as soon as you select multiple entries, the result messes up the spacing like this:

any_command --somearg  --selection1 --selection2FILE1 FILE2

Expected behavior

When using multiple selections a space should always be appended after each selected argument, but it seems like a space is prepended for some reason.

I can make sure:

Environment:

Minimal zshrc

An otherwise empty zshrc with just compinit and the fzf plugin already shows this behavior.

Aloxaf commented 1 year ago

This seems to be a bug of upstream.

Pretend code

zle -C all-matches complete-word _generic
bindkey '^Xa' all-matches
zstyle ':completion:all-matches:*' old-matches only
zstyle ':completion:all-matches::::' completer _all_matches
disable-fzf-tab
mkdir a b c

: <Press tab and then C-x a> 0123456 and result is : a b0 c1 d/23456

oddlama commented 1 year ago

It there any way to see if this issue is known upstream? I cannot find a search function in their mailing list archive :/