Zsh prompt: autoload add-zsh-hook early enough

This commit is contained in:
tastytea 2022-04-24 19:38:01 +02:00
parent 69c528842a
commit 941e420c2d
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -90,13 +90,12 @@ function prompt_tastytea_vcs_async() {
} }
prompt_tastytea_vcs_async_start prompt_tastytea_vcs_async_start
autoload -U add-zsh-hook
add-zsh-hook precmd prompt_tastytea_vcs_precmd add-zsh-hook precmd prompt_tastytea_vcs_precmd
add-zsh-hook chpwd prompt_tastytea_vcs_chpwd add-zsh-hook chpwd prompt_tastytea_vcs_chpwd
} }
function prompt_tastytea_vcs() { function prompt_tastytea_vcs() {
autoload -U vcs_info autoload -U vcs_info add-zsh-hook
zmodload zsh/zutil zmodload zsh/zutil
zstyle ':vcs_info:*' formats "%F{${prompt_tastytea_colours[vcs]}}(%b)%u%c%f " zstyle ':vcs_info:*' formats "%F{${prompt_tastytea_colours[vcs]}}(%b)%u%c%f "