mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 09:50:06 +00:00
speed up nodeenv prompt
This commit is contained in:
parent
fed768479f
commit
f27db92335
1 changed files with 2 additions and 1 deletions
|
@ -1277,7 +1277,8 @@ prompt_nvm() {
|
||||||
# Segment to display NodeEnv
|
# Segment to display NodeEnv
|
||||||
prompt_nodeenv() {
|
prompt_nodeenv() {
|
||||||
if [[ -n "$NODE_VIRTUAL_ENV" ]]; then
|
if [[ -n "$NODE_VIRTUAL_ENV" ]]; then
|
||||||
local info="$(node -v)[${NODE_VIRTUAL_ENV:t}]"
|
_p9k_cached_cmd_stdout node --version || return
|
||||||
|
local info="${_P9K_RETVAL}[${NODE_VIRTUAL_ENV:t}]"
|
||||||
"$1_prompt_segment" "$0" "$2" "black" "green" 'NODE_ICON' 0 '' "${info//\%/%%}"
|
"$1_prompt_segment" "$0" "$2" "black" "green" 'NODE_ICON' 0 '' "${info//\%/%%}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue