浏览代码

feat(aws): add sso logout capabilities (#12113)

Basti 1 年之前
父节点
当前提交
94a0481f18
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      plugins/aws/README.md
  2. 2 0
      plugins/aws/aws.plugin.zsh

+ 1 - 0
plugins/aws/README.md

@@ -16,6 +16,7 @@ plugins=(... aws)
   It also sets `$AWS_EB_PROFILE` to `<profile>` for the Elastic Beanstalk CLI. It sets `$AWS_PROFILE_REGION` for display in `aws_prompt_info`.
   Run `asp` without arguments to clear the profile.
 * `asp [<profile>] login`: If AWS SSO has been configured in your aws profile, it will run the `aws sso login` command following profile selection.
+* `asp [<profile>] logout`: If AWS SSO has been configured in your aws profile, it will run the `aws sso logout` command following profile selection.
 
 * `asr [<region>]`: sets `$AWS_REGION` and `$AWS_DEFAULT_REGION` (legacy) to `<region>`.
   Run `asr` without arguments to clear the profile.

+ 2 - 0
plugins/aws/aws.plugin.zsh

@@ -30,6 +30,8 @@ function asp() {
 
   if [[ "$2" == "login" ]]; then
     aws sso login
+  elif [[ "$2" == "logout" ]]; then
+    aws sso logout
   fi
 }