From fdb90994c9ba7863b97621ab75f6e2bd7b9dc530 Mon Sep 17 00:00:00 2001 From: romkatv Date: Thu, 21 Nov 2019 09:24:29 +0100 Subject: add `p10k reload` and call it from all standard configs --- config/p10k-classic.zsh | 4 ++++ config/p10k-lean.zsh | 4 ++++ config/p10k-pure.zsh | 4 ++++ config/p10k-rainbow.zsh | 4 ++++ 4 files changed, 16 insertions(+) (limited to 'config') diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 421e5df9..17ec57a9 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -912,6 +912,10 @@ # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you # really need it. typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload } (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index e9b76643..4064bdf7 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -888,6 +888,10 @@ # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you # really need it. typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload } (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index ab210957..026eeca9 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -149,6 +149,10 @@ # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you # really need it. typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload } (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index af3bbb22..0b6a5f51 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -939,6 +939,10 @@ # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you # really need it. typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload } (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} -- cgit v1.2.3