summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Prompts/promptinit6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 22dcf483d..086d9b385 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-01-05 Peter Stephenson <p.w.stephenson@ntlworld.com>
+ * Christian Höltje: 30087: Functions/Prompts/promptinit: remove
+ any hooks for a prompt theme when removing it.
+
* 30084: Doc/Zsh/zle.yo, Src/init.c, Src/Zle/zle_main.c,
Src/Zle/zle_refresh.c, Src/Zle/zle_thingy.c: `zle -T tc func'
defines function to be used insted of termcap output for
@@ -15829,5 +15832,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5555 $
+* $Revision: 1.5556 $
*****************************************************
diff --git a/Functions/Prompts/promptinit b/Functions/Prompts/promptinit
index b07eabb1f..66e73a7a5 100644
--- a/Functions/Prompts/promptinit
+++ b/Functions/Prompts/promptinit
@@ -155,8 +155,10 @@ Use prompt -h <theme> for help on specific themes.'
fi
# Reset some commonly altered bits to the default
- add-zsh-hook -D precmd "prompt_*_precmd"
- add-zsh-hook -D preexec "prompt_*_preexec"
+ local hook
+ for hook in chpwd precmd preexec periodic zshaddhistory zshexit; do
+ add-zsh-hook -D "${hook}" "prompt_*_${hook}"
+ done
set -A zle_highlight ${zle_highlight:#default:*}
(( ${#zle_highlight} )) || unset zle_highlight