aws.plugin.zsh 354 B

1234567891011121314151617
  1. export AWS_HOME=~/.aws
  2. function agp {
  3. echo $AWS_DEFAULT_PROFILE
  4. }
  5. function asp {
  6. export AWS_DEFAULT_PROFILE=$1
  7. export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
  8. }
  9. function aws_profiles {
  10. reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
  11. }
  12. compctl -K aws_profiles asp
  13. source `which aws_zsh_completer.sh`