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] Behavior of suffix matching changes #481

Closed
5 tasks done
jrwrigh opened this issue Oct 24, 2024 · 2 comments
Closed
5 tasks done

[BUG] Behavior of suffix matching changes #481

jrwrigh opened this issue Oct 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jrwrigh
Copy link
Contributor

jrwrigh commented Oct 24, 2024

Describe the bug

When trying to tab complete (i.e. fuzzy find) a file by it's suffix, the suffix is auto-added, but then completion stops working.

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.

To Reproduce

Steps to reproduce the behavior:

$ touch {a,b}_{c,d}.sh
$ ls
 a_c.sh   a_d.sh   b_c.sh   b_d.sh
$ls sh<Tab>
$ls _.sh

I've tracked down the behavior to #413

Expected behavior

Using commit 02ce77c (right before #413 was added), the following behavior occurs:
fzf-tab_good

Current Behavior

Using acdc372 (and master), I see:
fzf-tab_bad
I pause about a second between pressing tab above.

Note that it adds the _ from above. If the files are just named a.sh b.sh c.sh d.sh, then this behavior doesn't occur.

Environment:

  • OS: Manjaro
  • zsh version: 5.9

Log

zsh-70945-fzf-tab-1.log

@jrwrigh jrwrigh added the bug Something isn't working label Oct 24, 2024
@Aloxaf
Copy link
Owner

Aloxaf commented Nov 6, 2024

This is consistent with the behavior of zsh itself.
If you want to disable this behavior, you can set zstyle ':completion:*' menu yes

@Aloxaf Aloxaf closed this as completed Nov 6, 2024
@jrwrigh
Copy link
Contributor Author

jrwrigh commented Nov 6, 2024

That command doesn't disable the behavior. I added it to my .zshrc and manually ran the command and it has no effect.

Can confirm that this is consistent with zsh behavior, however dumb it maybe. Maybe it's a bug in upstream? I can't imagine anybody would desire to have that kind of behavior.

jrwrigh added a commit to jrwrigh/dotfiles2.0 that referenced this issue Nov 6, 2024
See Aloxaf/fzf-tab#481 for details of the
behavior that is avoided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants