Search code examples
zshzsh-completion

compgen:96: command not found: aws_completer when trying to autocomplete aws


I'm trying to get aws-cli autocompletion working in my zsh using oh-my-zsh, fzf, zsh-completion and fzf-tab-completion.

But when I hit tab after aws I get the following error:

compgen:96:command not found: aws_completer

This is my .zshrc:

source $HOME/.oh-my-zsh/custom/plugins/fzf-tab-completion/zsh/fzf-zsh-completion.sh 
zstyle ':completion:*:*:aws' fzf-search-display true

export ZSH="/Users/simon/.oh-my-zsh"

ZSH_THEME="half-life"


plugins=(aws fzf zsh-completions git brew npm react-native)
autoload -U compinit && compinit
source $ZSH/oh-my-zsh.sh

I suspect the issue could be that I installed the aws-cli bundle from the Amazon website first and after I installed brew install awscli but I don't know how to fix it.


Solution

  • I solved it by uninstalling the bundle and homebrew installation like so:

    $ sudo rm -rf /usr/local/aws
    $ sudo rm /usr/local/bin/aws
    $ brew remove awscli
    

    And reinstall it via homebrew:

    $ brew install awscli