aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-01-11 21:36:11 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-01-11 21:36:11 +0300
commit940e6dc1189886ce6cf3c8837088c7f234ea3d87 (patch)
treed88ff66caa62ade73e4c881f1ead2ca9dcf1b5c5 /internal
parent849e9519de1c4cf9ded5ebe59dda7e12c9665f77 (diff)
write all p10k-on-* hooks to instant prompt
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh38
1 files changed, 33 insertions, 5 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 4f8faf34..33c6547c 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -3905,7 +3905,7 @@ _p9k_set_instant_prompt() {
RPROMPT=$saved_rprompt
}
-typeset -gri __p9k_instant_prompt_version=14
+typeset -gri __p9k_instant_prompt_version=15
_p9k_dump_instant_prompt() {
local user=${(%):-%n}
@@ -4013,16 +4013,44 @@ _p9k_dump_instant_prompt() {
fi
if (( $+functions[p10k-on-init] )); then
>&$fd print -r -- '
- p10k-on-init() { '$functions[p10k-on-init]' }
- p10k-on-init
+ p10k-on-init() { '$functions[p10k-on-init]' }'
+ fi
+ if (( $+functions[p10k-on-pre-prompt] )); then
+ >&$fd print -r -- '
+ p10k-on-pre-prompt() { '$functions[p10k-on-pre-prompt]' }'
+ fi
+ if (( $+functions[p10k-on-post-prompt] )); then
+ >&$fd print -r -- '
+ p10k-on-post-prompt() { '$functions[p10k-on-post-prompt]' }'
+ fi
+ if (( $+functions[p10k-on-post-widget] )); then
+ >&$fd print -r -- '
+ p10k-on-post-widget() { '$functions[p10k-on-post-widget]' }'
+ fi
+ if (( $+functions[p10k-on-init] )); then
+ >&$fd print -r -- '
+ p10k-on-init'
+ fi
+ if (( $+functions[p10k-on-pre-prompt] )); then
+ >&$fd print -r -- '
+ p10k-on-pre-prompt'
+ fi
+ if (( $+functions[p10k-on-init] )); then
+ >&$fd print -r -- '
unfunction p10k-on-init'
fi
if (( $+functions[p10k-on-pre-prompt] )); then
>&$fd print -r -- '
- p10k-on-pre-prompt() { '$functions[p10k-on-pre-prompt]' }
- p10k-on-pre-prompt
unfunction p10k-on-pre-prompt'
fi
+ if (( $+functions[p10k-on-post-prompt] )); then
+ >&$fd print -r -- '
+ unfunction p10k-on-post-prompt'
+ fi
+ if (( $+functions[p10k-on-post-widget] )); then
+ >&$fd print -r -- '
+ unfunction p10k-on-post-widget'
+ fi
>&$fd print -r -- '
trap "unset -m _p9k__\*; unfunction p10k" EXIT
local -a _p9k_t=("${(@ps:$us:)${tail%%$rs*}}")'