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

[PATCH] 'prompt walters': Don't export PS1



---
I'm not sure why it checks $TERM: the code on the "if" branch would work
for TERM=dumb, too.  (The %U and RPROMPT would be noops, but wouldn't
break anything.)

diff --git a/Functions/Prompts/prompt_walters_setup b/Functions/Prompts/prompt_walters_setup
index b2b0b84..7948254 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
-    export PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
-    export RPROMPT="%F{${1:-green}}%~%f"
+    PROMPT='%B%(?..[%?] )%b%n@%U%m%u> '
+    RPROMPT="%F{${1:-green}}%~%f"
 else
-    export PROMPT="%(?..[%?] )%n@%m:%~> "
+    PROMPT="%(?..[%?] )%n@%m:%~> "
 fi
 
   prompt_opts=(cr percent)



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