浏览代码

agnoster: allow disabling AWS prompt with SHOW_AWS_PROMPT=false

Fixes #8040
Marc Cornellà 3 年之前
父节点
当前提交
d14bddf6d7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      themes/agnoster.zsh-theme

+ 1 - 1
themes/agnoster.zsh-theme

@@ -235,7 +235,7 @@ prompt_status() {
 #   ends in '-prod'
 #   ends in '-prod'
 # - displays black on green otherwise
 # - displays black on green otherwise
 prompt_aws() {
 prompt_aws() {
-  [[ -z "$AWS_PROFILE" ]] && return
+  [[ -z "$AWS_PROFILE" || "$SHOW_AWS_PROMPT" = false ]] && return
   case "$AWS_PROFILE" in
   case "$AWS_PROFILE" in
     *-prod|*production*) prompt_segment red yellow  "AWS: $AWS_PROFILE" ;;
     *-prod|*production*) prompt_segment red yellow  "AWS: $AWS_PROFILE" ;;
     *) prompt_segment green black "AWS: $AWS_PROFILE" ;;
     *) prompt_segment green black "AWS: $AWS_PROFILE" ;;