aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorZaidhaan Hussain <zaidhaan03@gmail.com>2023-05-06 10:52:08 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2023-05-07 10:33:06 +0300
commit5d16c106ed2807fb368dcac4df0e2b3dd619bb8d (patch)
treefb3d355324f6901bc61d7411c245d3812da56b7f /internal/p10k.zsh
parent0af598cbed78660066f8a8f4465844501ba5695b (diff)
nvm: implement POWERLEVEL9K_NVM_SHOW_SYSTEM and default to true
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index a8223299..cf32f9ba 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -2568,6 +2568,9 @@ prompt_nvm() {
[[ -n $NVM_DIR ]] && _p9k_nvm_ls_current || return
local current=$_p9k__ret
! _p9k_nvm_ls_default || [[ $_p9k__ret != $current ]] || return
+ if (( !_POWERLEVEL9K_NVM_SHOW_SYSTEM )); then
+ [[ $current == system ]] && return
+ fi
_p9k_prompt_segment "$0" "magenta" "black" 'NODE_ICON' 0 '' "${${current#v}//\%/%%}"
}
@@ -7530,6 +7533,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_SHOW_SYSTEM 1
_p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0
_p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global
_p9k_declare -b POWERLEVEL9K_RBENV_SHOW_SYSTEM 1