Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
5 tasks done
oddlama opened this issue Feb 16, 2023 · 2 comments
Open
5 tasks done
Labels
bug Something isn't working upstream

Comments

@oddlama
Copy link

oddlama commented Feb 16, 2023

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:

  • I am using the latest version of fzf-tab
  • this is the minimal zshrc which can reproduce this bug
  • fzf-tab is loaded after compinit
  • fzf-tab is loaded after plugins which will wrap Tab, like junegunn/fzf/completion.zsh
  • fzf-tab is loaded before zsh-autosuggestions, zsh-syntax-highlighting and fast-syntax-highlighting.

Environment:

  • OS: nixos unstable
  • zsh version: 5.9

Minimal zshrc

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

@oddlama oddlama added the bug Something isn't working label Feb 16, 2023
@Aloxaf
Copy link
Owner

Aloxaf commented Feb 17, 2023

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
Copy link
Author

oddlama commented Feb 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants