Skip to content

Instantly share code, notes, and snippets.

@m4dz
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4dz/d0779f3265146ee74fe3 to your computer and use it in GitHub Desktop.
Save m4dz/d0779f3265146ee74fe3 to your computer and use it in GitHub Desktop.
FOUND_NDENV=0
ndenvdirs=("$HOME/.ndenv" "/usr/local/ndenv" "/opt/ndenv")
for ndenvdir in "${ndenvdirs[@]}" ; do
if [ -d $ndenvdir/bin -a $FOUND_NDENV -eq 0 ] ; then
FOUND_NDENV=1
export PATH=${ndenvdir}/bin:$PATH
eval "$(ndenv init --no-rehash - zsh)"
function ndenv_prompt_info() {
echo "$(ndenv version-name)"
}
fi
done
unset ndenvdir
if [ $FOUND_NDENV -eq 0 ] ; then
function ndenv_prompt_info() { echo "system: $(node --version)" }
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment