Add support for nvm ls stable and nvm ls unstable

This commit is contained in:
Jordan Harband
2014-09-29 00:09:48 -07:00
parent 5dc7af6285
commit c918e570b6
3 changed files with 32 additions and 0 deletions

5
nvm.sh
View File

@@ -274,6 +274,11 @@ nvm_ls() {
fi
else
if [ "_$PATTERN" != "_system" ]; then
if nvm_validate_implicit_alias "$PATTERN" 2> /dev/null ; then
nvm_ls "$(nvm_print_implicit_alias local "$PATTERN" 2> /dev/null)"
return $?
fi
local NUM_VERSION_GROUPS
NUM_VERSION_GROUPS="$(nvm_num_version_groups "$PATTERN")"
if [ "_$NUM_VERSION_GROUPS" = "_2" ] || [ "_$NUM_VERSION_GROUPS" = "_1" ]; then