diff --git a/modules/node/functions/node-info b/modules/node/functions/node-info index 7a591279..19e577a5 100644 --- a/modules/node/functions/node-info +++ b/modules/node/functions/node-info @@ -6,8 +6,6 @@ # Zeh Rizzatti # -# function node-info { - local version local version_format local version_formatted @@ -17,6 +15,8 @@ typeset -gA node_info if (( $+commands[nodenv] )); then version="${${$(nodenv version)#v}[(w)0]}" +elif (( $+commands[volta] )); then + version="${${$(volta list node | grep 'default')#⚡ }[(w)2]}" elif (( $+functions[nvm_version] )); then version="${$(nvm_version)#v}" elif (( $+commands[node] )) ; then @@ -27,6 +27,4 @@ if [[ "$version" != (none|system) ]]; then zstyle -s ':prezto:module:node:info:version' format 'version_format' zformat -f version_formatted "$version_format" "v:$version" node_info[version]="$version_formatted" -fi - -# } +fi \ No newline at end of file