# Put node-build on PATH
export PATH=<%= scope.lookupvar("::nodejs::build::prefix") %>/bin:$PATH

# Configure NODENV_ROOT and put NODENV_ROOT/bin on PATH
export NODENV_ROOT=<%= scope.lookupvar("::nodejs::nodenv::prefix") %>
export PATH=$NODENV_ROOT/bin:$PATH

# Load nodenv
eval "$(nodenv init -)"

export PATH=./node_modules/.bin:$PATH

# Helper for shell prompts and the like
current_node() {
  echo "$(nodenv version)"
}

# Put node-build on PATH
export PATH=<%= scope.lookupvar("::nodejs::build::prefix") %>/bin:$PATH

# Configure NODENV_ROOT and put NODENV_ROOT/bin on PATH
export NODENV_ROOT=<%= scope.lookupvar("::nodejs::nodenv::prefix") %>
export PATH=$NODENV_ROOT/bin:$PATH

# Load nodenv
eval "$(nodenv init -)"

export PATH=./node_modules/.bin:$PATH

# Helper for shell prompts and the like
current_node() {
  echo "$(nodenv version-name)"
}

Use nodenv version-name in shell helper function
Use nodenv version-name in shell helper function

`nodenv version` includes a description of how the version was selected:

    $ nodenv version
    5.0.0 (set by /opt/boxen/nodenv/version)

`nodenv version-name` prints the version number on its own:

    $ nodenv version-name
    5.0.0

Since the current_node function is intended to be used "in shell prompts
and the like", the second shorter form is more appropriate.
