saml2aws
saml2aws copied to clipboard
Adding autocomplete line to .zshrc breaks aws autocomplete
This may simply be an issue with my understanding of the "order" of items in my ~/.zshrc file, but adding the line you suggest for your auto-completion, eval "$(saml2aws --completion-script-zsh)"
after the AWS CLI autocomplete lines as listed here, will break the usage of AWS CLI autocomplete. Thanks for any insight.
AWS asks to add these lines to your profile:
autoload -Uz compinit && compinit
autoload -U +X bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws
You can just use the bash version after you load the aws completion. Like this:
autoload -Uz compinit && compinit
autoload -U +X bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws
eval "$(saml2aws --completion-script-bash)"
Yep, fixed it! Thank you! @patrickli
Any little tidbit of knowledge on WHY this worked? Thanks again.
The only difference between --completion-script-bash
and --completion-script-zsh
is the zsh
version adds the autoload
lines you already have above.
So this should work as well:
eval "$(saml2aws --completion-script-zsh)"
complete -C '/usr/local/bin/aws_completer' aws
Thank you. Really appreciate the insight. Cheers!