Patch attached, but not yet including Daniel’s suggested change below (since I still have questions about it). It includes an update to the docs, but note that I am not able to build those myself. I would much appreciate it f someone else could do that to test whether I did it correctly. On 14 Apr 2021, at 15:05, Daniel Shahaf wrote: >> +++ b/Functions/Prompts/promptinit >> @@ -178,8 +177,13 @@ Use prompt -h for help on specific themes.' >> >> # Reset some commonly altered bits to the default >> local hook >> - for hook in chpwd precmd preexec periodic zshaddhistory zshexit; do >> - add-zsh-hook -D "${hook}" "prompt_*_${hook}" >> + for hook in chpwd precmd preexec periodic zshaddhistory zshexit \ >> + zsh_directory_name; do >> + add-zsh-hook -D "$hook" "prompt_*_$hook" >> + done >> + for hook in isearch-exit isearch-update line-pre-redraw line-init \ >> + line-finish history-line-set keymap-select; do >> + add-zle-hook-widget -D "$hook" "prompt_*_$hook" > > All these should be documented, like prompt_${foo}_preview is. > > Recommend to name these prompt_${foo}_bar-{isearch-exit,isearch-update,…,keymap-select} > for some fixed value of «bar» to avoid namespace issues (i.e., name > collisions between existing prompts and future hooks). Wouldn’t that be a breaking change in the API, though? I mean, there are already 3rd party prompt themes that use the current prompt_${foo}_{isearch-exit,isearch-update,…,keymap-select} naming scheme. Also, isn’t the prefix prompt_${foo}_ already a namespace of sorts? Why change this?