summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-18 17:00:43 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-18 17:00:43 +0000
commitbf43db124afac747c1efb02716092b107bc66ad1 (patch)
treeea227000299cf41f4e7a18c16ec23a0c988c5736
parentcfff2d521e1632ffc57823437de0709662d85e9b (diff)
downloadzsh-bf43db124afac747c1efb02716092b107bc66ad1.tar.gz
zsh-bf43db124afac747c1efb02716092b107bc66ad1.zip
25063: minor tweaks to Bart's prompt
-rw-r--r--ChangeLog3
-rw-r--r--Functions/Prompts/prompt_bart_setup8
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ae6b65fad..ace2ac077 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-05-18 Peter Stephenson <p.w.stephenson@ntlworld.com>
+ * 25063: Functions/Prompts/prompt_bart_setup: minor
+ tweaks.
+
* Mikael: 25054: Doc/Zsh/prompt.yo: typo.
2008-05-17 Peter Stephenson <p.w.stephenson@ntlworld.com>
diff --git a/Functions/Prompts/prompt_bart_setup b/Functions/Prompts/prompt_bart_setup
index 4489c0425..a71bf2deb 100644
--- a/Functions/Prompts/prompt_bart_setup
+++ b/Functions/Prompts/prompt_bart_setup
@@ -151,8 +151,7 @@ prompt_bart_setup () {
# A few extra niceties ...
repeat 1 case "$1:l" in
(off|disable)
- precmd_functions[(r)prompt_*_precmd]=
- precmd_functions=($precmd_functions)
+ add-zsh-hook -D precmd "prompt_*_precmd"
functions[TRAPWINCH]="${functions[TRAPWINCH]//prompt_bart_winch}"
[[ $prompt_theme[1] = bart ]] && PS1=${${(f)PS1}[-1]}
return 1
@@ -162,7 +161,10 @@ prompt_bart_setup () {
[[ $prompt_theme[1] = bart ]] && break
;&
(*)
- # Abuse the fg assoc to hold our selected colors ...
+ # Use the fg assoc to hold our selected colors ...
+ # This used to be provided by the function colors, but is now
+ # set directly from here. There should be no clash if both
+ # are in use.
fg[%m]="%F{${1:-red}}"
fg[%h]="%F{${2:-blue}}"
fg[%~]="%F{${3:-default}}"