diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-07-30 16:11:58 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-07-30 16:11:58 +0300 |
commit | 2e5a085dbef51418a22bb326c5a246e4ccb79d11 (patch) | |
tree | db2b9ef5c056148621128794a9c4467e83103e52 /internal | |
parent | 89f3ec16d027bcf7d549d0b3e7087d162d91934c (diff) |
run configuration wizard automatically if no POWERLEVEL9K options are defined
Diffstat (limited to 'internal')
-rwxr-xr-x | internal/p10k.zsh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ce6cfa14..87aaa184 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3277,7 +3277,18 @@ _p9k_precmd() { unset _p9k_real_zle_rprompt_indent fi - _p9k_must_init && _p9k_init + if _p9k_must_init; then + if (( !__p9k_configured )); then + __p9k_configured=1 + if [[ -z ${parameters[(i)POWERLEVEL9K_*]} ]] && _p9k_can_configure -q; then + if $__p9k_root_dir/internal/wizard.zsh -d $__p9k_root_dir; then + source $__p9k_cfg_path + _p9k_must_init + fi + fi + fi + _p9k_init + fi unsetopt localoptions prompt_opts=(cr percent sp subst) @@ -4294,6 +4305,7 @@ _p9k_deinit() { } typeset -gi __p9k_enabled=0 +typeset -gi __p9k_configured=0 prompt_powerlevel9k_setup() { emulate -L zsh && setopt no_hist_expand extended_glob |