Merge pull request #205 from deiga/add-current-command

Added command to get current nvm environment.
This commit is contained in:
Jordan Harband committed 2013-12-16 23:39:23 -08:00
commit d7015c7f65
2 files changed
+9

No files matched your search

+3
View File
@@ -441,6 +441,9 @@ nvm() {
print_versions "`nvm_ls_remote $2`"
return
;;
"current" )
echo -ne "current: \t"; nvm_version current
;;
"alias" )
mkdir -p $NVM_DIR/alias
if [ $# -le 2 ]; then
@@ -0,0 +1,6 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
[[ $(nvm current) == *"current"* ]] || die "Failed to find current version"