diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-05-21 15:14:04 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-05-21 15:14:04 +0300 |
commit | f27db9233521ccfa6c41be5570ab3f62fa1deabc (patch) | |
tree | c4d896f62054f16284ce7adeb50dc6cab116d509 | |
parent | fed768479f8fedb28766927d914b007983d71a04 (diff) |
speed up nodeenv prompt
-rwxr-xr-x | powerlevel9k.zsh-theme | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 17c780e3..9d957285 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1277,7 +1277,8 @@ prompt_nvm() { # Segment to display NodeEnv prompt_nodeenv() { 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//\%/%%}" fi } |