How to make auto-complete work for AWS on ZSH? I installed awscli from brew.

The amazon instructions refer to a shell script, aws_zsh_completer.sh that doesn't appear to be included.   I do have an /usr/local/bin/aws_completer.

How do I make the autocompleter for aws work on zsh in iTerm2 on macos Catalina?
OK - completions need a bit of help to get going - brew includes the definitions, but you have to prime the completions mechanism if you haven't enabled one yet.

brew install zsh-completions
autoload -Uz compinit
compinit


Press y when asked to ignore insecure directories

Then to test things out run the initialization:

autoload bashcompinit &amp;&amp; bashcompinit
source /usr/local/bin/aws_zsh_completer.sh


I know - it says bash and you use zsh - you can type aws followed by a space and gla and tab and it should pause a bit and complete to the glacier command instead of file completion:

aws gla


Once that's set, you have to set up your .zshrc and likely fix the insecure compinit error by removing write permissions on some directories.