Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] 'prompt walters': Don't export PS1
- X-seq: zsh-workers 37214
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] 'prompt walters': Don't export PS1
- Date: Wed, 25 Nov 2015 01:45:45 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=QmY W14l8uaYeulseF5PuDu1gChU=; b=fThzE+OBG+J4ZQQp19TA3yGzj79j0KsFaP6 oCdFzgKEqi2FZZSiRq1lHppt9T/oJaVDnQfKNcqbEMTSxjzeiItPpNjxfSbUrPjD 0MDmPY84po02oDv89FlClk0Z9kVK5jq1w/KIYbagxPzjHXrGRxZKbcl6HJ0Crvq3 WKSXUrE8=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Qm YW14l8uaYeulseF5PuDu1gChU=; b=DFA823OlcEtGLAJZYJOsqb9V33BqlKQ04m iAOfj0VbPQ880kzy0kt8xa8Jgc/EvXU/WQaL4zOlTWDI+kCi7w3S4uLhnS0V95G4 WxvDQFfc1dDLvcUe3vKlqb0sJjZjq33MsuJQV7cIwg81DbJB8DCDNd01zsNkGHBc 7q9cZZH7o=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
---
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