summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-04-09 22:20:00 +0200
committerGitHub <noreply@github.com>2019-04-09 22:20:00 +0200
commit0c3499ecd9cdd562ae88fa4b33db97311a78cb07 (patch)
treeef38f8e189ba46ebcce2b6c5532fbe9a2f92d8c4
parentafb28d337df91be52eb7f66fb0badc513243825a (diff)
parent5f9cc016d7fb19004529ea935d6a386846ad46e2 (diff)
downloadzsh-0c3499ecd9cdd562ae88fa4b33db97311a78cb07.tar.gz
zsh-0c3499ecd9cdd562ae88fa4b33db97311a78cb07.tar.bz2
zsh-0c3499ecd9cdd562ae88fa4b33db97311a78cb07.zip
Fix showing aws prompt out of the box for 'fishy' theme (#7747)
This fixes the RPROMPT setting for fishy theme so as to preserve its old value, instead of overwriting it like it did before. Also, fix unnecessary export of RPROMPT in aws plugin.
-rw-r--r--plugins/aws/README.md2
-rw-r--r--plugins/aws/aws.plugin.zsh2
-rw-r--r--themes/fishy.zsh-theme2
3 files changed, 4 insertions, 2 deletions
diff --git a/plugins/aws/README.md b/plugins/aws/README.md
index a52024128..57c3b54ac 100644
--- a/plugins/aws/README.md
+++ b/plugins/aws/README.md
@@ -25,6 +25,8 @@ plugins=(... aws)
## Plugin options
* Set `SHOW_AWS_PROMPT=false` in your zshrc file if you want to prevent the plugin from modifying your RPROMPT.
+ Some themes might overwrite the value of RPROMPT instead of appending to it, so they'll need to be fixed to
+ see the AWS profile prompt.
## Theme
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 6de329bb8..0895cfb3a 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -44,7 +44,7 @@ function aws_prompt_info() {
}
if [ "$SHOW_AWS_PROMPT" != false ]; then
- export RPROMPT='$(aws_prompt_info)'"$RPROMPT"
+ RPROMPT='$(aws_prompt_info)'"$RPROMPT"
fi
diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme
index 83bd455b5..00a60f45b 100644
--- a/themes/fishy.zsh-theme
+++ b/themes/fishy.zsh-theme
@@ -14,7 +14,7 @@ PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>)
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
-RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
+RPROMPT="${RPROMPT}"'${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" "
ZSH_THEME_GIT_PROMPT_SUFFIX=""