File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -394,6 +394,27 @@ function hg_prompt_vars() {
394394 fi
395395}
396396
397+ function node_command_version_prompt() {
398+ local node_version
399+ if _command_exists node; then
400+ node_version=" $( node --version 2> /dev/null) "
401+ if [[ -n ${node_version} ]]; then
402+ echo -e " ${NVM_THEME_PROMPT_PREFIX}${node_version}${NVM_THEME_PROMPT_SUFFIX} "
403+ fi
404+ fi
405+ }
406+
407+ function node_version_prompt() {
408+ local node_version
409+ node_version=" $( nvm_version_prompt) "
410+ if [[ -z " ${node_version} " ]]; then
411+ node_version=" $( node_command_version_prompt) "
412+ fi
413+ if [[ -n " ${node_version} " ]]; then
414+ echo -e " ${node_version} "
415+ fi
416+ }
417+
397418function nvm_version_prompt() {
398419 local node
399420 if _is_function nvm; then
Original file line number Diff line number Diff line change @@ -45,13 +45,13 @@ NVM_THEME_PROMPT_SUFFIX=""
4545NODE_THEME_PROMPT_PREFIX=" "
4646NODE_THEME_PROMPT_SUFFIX=" "
4747NODE_CHAR=${POWERLINE_NODE_CHAR:= " ❲n❳ " }
48- NODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:= 22 }
48+ NODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:= 28 }
4949
5050RVM_THEME_PROMPT_PREFIX=" "
5151RVM_THEME_PROMPT_SUFFIX=" "
5252RBENV_THEME_PROMPT_PREFIX=" "
5353RBENV_THEME_PROMPT_SUFFIX=" "
54- RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:= 161 }
54+ RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:= 1 }
5555RUBY_CHAR=${POWERLINE_RUBY_CHAR:= " ❲r❳ " }
5656
5757TERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:= 161}
You can’t perform that action at this time.
0 commit comments