Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Fzf-tab not working for oh-my-zsh `aws` plugin when running commands like `asp`, `acp`

timharris777 opened this issue · comments

Describe the bug

I am using the aws zsh plugin provided by oh-my-zsh. When I run commands provided by the plugin (asp, acp) fzf-tab does not work, but basic tab completion does work. For everything else fzf-tab seems to work just fine for tab completions.

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 ** Not sure as I am using znap and it autoloads 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

  1. Open a new terminal window and type asp followed by pressing tab.

Expected behavior

The expected behavior would be for the available aws profiles to be shown by FZF. Instead they are shown by default tab completion behavior.

Screenshots

Not working for commands provided by oh-my-zsh aws plugin...
image

Working for other commands...
image

Environment:

  • OS: MacOS Sonoma 14.3.1 (23D60)
  • zsh version: zsh 5.9 (x86_64-apple-darwin23.0)

Minimal zshrc

# znap: Install and source 
[[ -r ~/.znap/znap.zsh ]] ||
    git clone --depth 1 -- https://github.com/marlonrichert/zsh-snap.git ~/.znap
source ~/.znap/znap.zsh

# znap: set prompt to startship if available, and if not spaceship
if [ -x "$(command -v starship)" ]; then
    znap eval starship 'starship init zsh --print-full-init'
else
    znap prompt spaceship-prompt/spaceship-prompt
fi

# znap: install plugins
znap source ohmyzsh/ohmyzsh plugins/{brew,asdf,kubectl,aws,git,npm,fzf,pip,command-not-found}
znap source Aloxaf/fzf-tab
znap source zsh-users/zsh-syntax-highlighting
znap source zsh-users/zsh-autosuggestions
znap source zdharma-continuum/fast-syntax-highlighting

Log

I tried using C-x . to trigger completion and provide the log but it doesn't seem to be working. Are there more details on what this means? I'm on a mac and am assuming that it means type your command and instead of pressing tab press ctrl+x .. This does nothing for me.

Thanks for your report.

The OMZ aws plugin uses compctl for completion, which is outdated and not supported.