the following commands assume that you have the awscli command installed on your mac. if you don’t then just type in brew install awscli. having awscli auto-complete is easier than the az cli because it ships with the aws_completer command. we find the aws_completer and register it to auto-load in our .zshrc. the following command does this. restart your zsh (cmd+q) after entering this command.
aws_comp="$(brew --prefix)/bin/aws_completer"
[[ -x "$aws_comp" ]] && printf '\n# aws cli auto completion\nautoload -U +X bashcompinit && bashcompinit\nautoload -Uz compinit && compinit\ncomplete -C "%s" aws\n' "$aws_comp" >> ~/.zshrc || echo 'aws_completer not found'
Leave a Reply