Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] fzf-bindings 'tab:accept' stops working after changing directories and going back

brunovzky opened this issue · comments

Describe the bug

zstyle ':fzf-tab:*' fzf-bindings 'tab:accept' stops working after changing directories and going back

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:

  1. Add zstyle ':fzf-tab:*' fzf-bindings 'tab:accept' to your ~/.zshrc file and source ~/.zshrc
  2. Change directories for two/three times using Tab to accept the selected option and then use cd or cd .. to go back one directory
  3. Instead of accepting the selected option, Tab will now cycle between then (as If the bind were not added)
  4. After using the clear command the bind starts works again

Expected behavior

Keep using tab as the binded key

Screenshots

Video.mp4

Environment:

  • OS: MacOS Ventura 13.5.2
  • ZSH Version: zsh 5.9 (x86_64-apple-darwin23.0)

Minimal zshrc (My current settings for FZF-Tab)

[[ -z $TMUX ]] && exec tmux
zstyle ':fzf-tab:' fzf-bindings 'tab:accept'
zstyle ':fzf-tab:
' fzf-command ftb-tmux-popup

Just disable popup-smart-tab: zstyle ':fzf-tab:*' popup-smart-tab no

if zstyle -T ":fzf-tab:$_ftb_curcontext" popup-smart-tab; then
fzf_opts+=(--bind=tab:up,btab:down)
fi