Browse Source

Don't set node-info if version is 'none'

This is done to make it easier to not show node-info in themes
when no node version is currently in use. This is consistent with
how the Python module's python-info works.

Signed-off-by: Sorin Ionescu <sorin.ionescu@gmail.com>
master
Trevor Bekolay 10 years ago committed by Sorin Ionescu
parent
commit
4e4a6fcc63
  1. 2
      modules/node/functions/node-info

2
modules/node/functions/node-info

@ -17,7 +17,7 @@ if (( $+functions[nvm_version] )); then
version="${$(nvm_version)#v}" version="${$(nvm_version)#v}"
fi fi
if [[ -n "$version" ]]; then if [[ "$version" == (none|) ]]; then
zstyle -s ':prezto:module:node:info:version' format 'version_format' zstyle -s ':prezto:module:node:info:version' format 'version_format'
zformat -f version_formatted "$version_format" "v:$version" zformat -f version_formatted "$version_format" "v:$version"
node_info[version]="$version_formatted" node_info[version]="$version_formatted"

Loading…
Cancel
Save