summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2023-05-08 10:04:43 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2023-05-08 10:06:00 +0300
commit016512f493c52d2b32d4ade4fbd4638617a8cf83 (patch)
tree5a42023ab7f7ecbd41dde7e10ef0f7dbe890a34f /internal/p10k.zsh
parent7039779c19c7b7b3f954abfa1667c465d723dbe7 (diff)
nvm: change the default value of POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW to true and fix the way it is used (#2296)
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh18
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 87af17e8..67561c45 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -2567,13 +2567,13 @@ _p9k_nvm_ls_current() {
prompt_nvm() {
[[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return
local current=$_p9k__ret
- _p9k_nvm_ls_default
- if (( !_POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )); then
- [[ $current == $_p9k__ret ]] && return
- fi
- if (( !_POWERLEVEL9K_NVM_SHOW_SYSTEM )); then
- [[ $current == system ]] && return
- fi
+ (( _POWERLEVEL9K_NVM_SHOW_SYSTEM )) ||
+ [[ $current != system ]] ||
+ return
+ (( _POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW )) ||
+ ! _p9k_nvm_ls_default ||
+ [[ $_p9k__ret != $current ]] ||
+ return
_p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}"
}
@@ -7536,7 +7536,7 @@ _p9k_init_params() {
_p9k_declare -b POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_NODENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_NODENV_SHOW_SYSTEM 1
- _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 0
+ _p9k_declare -b POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW 1
_p9k_declare -b POWERLEVEL9K_NVM_SHOW_SYSTEM 1
_p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global
@@ -8390,7 +8390,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v147\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat=$'v148\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
_p9k__param_pat+=$__p9k_force_term_shell_integration$'\1'
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'