about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorMarlon Richert <marlon.richert@gmail.com>2021-05-16 21:18:06 -0700
committerBart Schaefer <schaefer@ipost.com>2021-05-16 21:18:06 -0700
commit7383baf4cff9a1621b9b5517689a5653ae86e123 (patch)
treed5da4dbc89cca478f34dab476035523acb73d0e2 /Doc
parent338af5ea0fc5609c7054eb0f6f94ef85856c198d (diff)
downloadzsh-7383baf4cff9a1621b9b5517689a5653ae86e123.tar.gz
zsh-7383baf4cff9a1621b9b5517689a5653ae86e123.tar.xz
zsh-7383baf4cff9a1621b9b5517689a5653ae86e123.zip
48853: improved handling of theme resets when changing prompt themes, especially for theme preview
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/contrib.yo10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo
index b777703b3..a972f08d6 100644
--- a/Doc/Zsh/contrib.yo
+++ b/Doc/Zsh/contrib.yo
@@ -2041,10 +2041,12 @@ setopts (tt(promptbang), etc.) are turned on, all other prompt-related
 options are turned off.  The tt(prompt_opts) array preserves setopts even
 beyond the scope of tt(localoptions), should your function need that.
 )
-item(Modify precmd and preexec)(
-Use of tt(add-zsh-hook) is recommended.  The tt(precmd) and tt(preexec)
-hooks are automatically adjusted if the prompt theme changes or is
-disabled.
+item(Modify hooks)(
+Use of tt(add-zsh-hook) and tt(add-zle-hook-widget) is recommended (see
+ifzman(the bf(Manipulating Hook Functions) section above)\
+ifnzman(noderef(Manipulating Hook Functions))\
+). All hooks that follow the naming pattern tt(prompt_)var(theme)tt(_)var(hook)
+are automatically removed when the prompt theme changes or is disabled.
 )
 item(Declare cleanup)(
 If your function makes any other changes that should be undone when the