File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -1415,11 +1415,11 @@ nvm_add_iojs_prefix() {
1415
1415
nvm_strip_iojs_prefix () {
1416
1416
local NVM_IOJS_PREFIX
1417
1417
NVM_IOJS_PREFIX=" $( nvm_iojs_prefix) "
1418
- if [ " ${1-} " = " ${NVM_IOJS_PREFIX} " ] ; then
1419
- nvm_echo
1420
- else
1421
- nvm_echo " ${1# " ${NVM_IOJS_PREFIX} " -} "
1422
- fi
1418
+
1419
+ case " ${1-} " in
1420
+ " ${NVM_IOJS_PREFIX} " ) nvm_echo ;;
1421
+ * ) nvm_echo " ${1# " ${NVM_IOJS_PREFIX} " -} " ;;
1422
+ esac
1423
1423
}
1424
1424
1425
1425
nvm_ls () {
@@ -1551,12 +1551,15 @@ nvm_ls() {
1551
1551
fi
1552
1552
1553
1553
if [ " ${NVM_ADD_SYSTEM-} " = true ]; then
1554
- if [ -z " ${PATTERN} " ] || [ " ${PATTERN} " = ' v' ]; then
1555
- VERSIONS=" ${VERSIONS}
1554
+ case " ${PATTERN} " in
1555
+ ' ' | v)
1556
+ VERSIONS=" ${VERSIONS}
1556
1557
system"
1557
- elif [ " ${PATTERN} " = ' system' ]; then
1558
- VERSIONS=" system"
1559
- fi
1558
+ ;;
1559
+ system)
1560
+ VERSIONS=" system"
1561
+ ;;
1562
+ esac
1560
1563
fi
1561
1564
1562
1565
if [ -z " ${VERSIONS} " ]; then
@@ -1690,7 +1693,7 @@ EOF
1690
1693
LTS=" ${LTS# lts/ } "
1691
1694
fi
1692
1695
1693
- VERSIONS=" $( { command awk -v lts=" ${LTS-} " ' {
1696
+ VERSIONS=" $( { command awk -v lts=" ${LTS-} " ' {
1694
1697
if (!$1) { next }
1695
1698
if (lts && $10 ~ /^\-?$/) { next }
1696
1699
if (lts && lts != "*" && tolower($10) !~ tolower(lts)) { next }
You can’t perform that action at this time.
0 commit comments