0c3499ecd9cdd562ae88fa4b33db97311a78cb07

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

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.

Diff

 1diff --git a/plugins/aws/README.md b/plugins/aws/README.md
 2index a52024128a3c9c2bf2f45b6ae6bb3d047232e5c8..57c3b54acddf726fb7c7790f1855ac5403a21a85 100644
 3--- a/plugins/aws/README.md
 4+++ b/plugins/aws/README.md
 5@@ -25,6 +25,8 @@ plugins=(... aws)
 6 ## Plugin options
 7 
 8 * Set `SHOW_AWS_PROMPT=false` in your zshrc file if you want to prevent the plugin from modifying your RPROMPT.
 9+  Some themes might overwrite the value of RPROMPT instead of appending to it, so they'll need to be fixed to
10+  see the AWS profile prompt.
11 
12 ## Theme
13 
14diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
15index 6de329bb851e741d87d1fe6fca0c068b8c71c81c..0895cfb3a8c4c0b6536011dc253e36d439557a1d 100644
16--- a/plugins/aws/aws.plugin.zsh
17+++ b/plugins/aws/aws.plugin.zsh
18@@ -44,7 +44,7 @@ function aws_prompt_info() {
19 }
20 
21 if [ "$SHOW_AWS_PROMPT" != false ]; then
22-  export RPROMPT='$(aws_prompt_info)'"$RPROMPT"
23+  RPROMPT='$(aws_prompt_info)'"$RPROMPT"
24 fi
25 
26 
27diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme
28index 83bd455b576441b744b7e493c8b27fc5f970c1f0..00a60f45b15777abcff847669a602bb0c164d797 100644
29--- a/themes/fishy.zsh-theme
30+++ b/themes/fishy.zsh-theme
31@@ -14,7 +14,7 @@ PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>)
32 PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
33 
34 local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
35-RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
36+RPROMPT="${RPROMPT}"'${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
37 
38 ZSH_THEME_GIT_PROMPT_PREFIX=" "
39 ZSH_THEME_GIT_PROMPT_SUFFIX=""