Last active
August 29, 2015 14:26
-
-
Save m4dz/d0779f3265146ee74fe3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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