Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: When RPROMPT != RPS1



On Wed, 21 Jun 2017 10:16:45 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> I don't have a good suggestion for how to satisfy both constraints.
> Anyone?  The parameter initialization code has been broken up into
> a few more sections already, maybe there's a way to rearrange these
> as well.

We can at least make it less likely people are going to trip over the
complications if they're simply using the prompt system.

pws

idiff --git a/Functions/Prompts/prompt_walters_setup b/Functions/Prompts/prompt_walters_setup
index 7948254..9fea574 100644
--- a/Functions/Prompts/prompt_walters_setup
+++ b/Functions/Prompts/prompt_walters_setup
@@ -14,10 +14,10 @@ EOF
 prompt_walters_setup () {
 
 if [[ "$TERM" != "dumb" ]]; then
-    PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
-    RPROMPT="%F{${1:-green}}%~%f"
+    PS1='%B%(?..[%?] )%b%n@%U%m%u> '
+    RPS1="%F{${1:-green}}%~%f"
 else
-    PROMPT="%(?..[%?] )%n@%m:%~> "
+    PS1="%(?..[%?] )%n@%m:%~> "
 fi
 
   prompt_opts=(cr percent)



Messages sorted by: Reverse Date, Date, Thread, Author