zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] 'prompt walters': Don't export PS1
@ 2015-11-25  1:45 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-11-25  1:45 UTC (permalink / raw)
  To: zsh-workers

---
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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-25  1:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25  1:45 [PATCH] 'prompt walters': Don't export PS1 Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).