File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -603,17 +603,20 @@ nvm_ls() {
603
603
fi
604
604
if [ -n " $NVM_DIRS_TO_SEARCH " ]; then
605
605
VERSIONS=" $( command find $NVM_DIRS_TO_SEARCH -maxdepth 1 -type d -name " $PATTERN *" \
606
- | command sed " s#$NVM_VERSION_DIR_IOJS /#" $NVM_IOJS_PREFIX " -#" \
607
- | command grep -v " $NVM_VERSION_DIR_IOJS " \
608
- | command sed " s#^$NVM_DIR /##" \
609
- | command grep -v -e ' ^versions$' \
610
- | command sed ' s#^versions/##' \
611
- | sed -e " s/^v/$NVM_NODE_PREFIX -v/" \
612
- | sed -e " s#^\($NVM_IOJS_PREFIX \)[-/]v#\1.v#" | sed -e " s#^\($NVM_NODE_PREFIX \)[-/]v#\1.v#" \
606
+ | command sed "
607
+ s#$NVM_VERSION_DIR_IOJS /#$NVM_IOJS_PREFIX -#;
608
+ \#$NVM_VERSION_DIR_IOJS # d;
609
+ s#^$NVM_DIR /##;
610
+ \#^versions\$ # d;
611
+ s#^versions/##;
612
+ s#^v#$NVM_NODE_PREFIX -v#;
613
+ s#^\($NVM_IOJS_PREFIX \)[-/]v#\1.v#;
614
+ s#^\($NVM_NODE_PREFIX \)[-/]v#\1.v#" \
613
615
| command sort -t. -u -k 2.2,2n -k 3,3n -k 4,4n \
614
616
| command sort -s -t- -k1.1,1.1 \
615
- | command sed " s/^\($NVM_IOJS_PREFIX \)\./\1-/" \
616
- | command sed " s/^$NVM_NODE_PREFIX \.//" ) "
617
+ | command sed "
618
+ s/^\($NVM_IOJS_PREFIX \)\./\1-/;
619
+ s/^$NVM_NODE_PREFIX \.//" ) "
617
620
fi
618
621
619
622
if [ $ZHS_HAS_SHWORDSPLIT_UNSET -eq 1 ] && nvm_has " unsetopt" ; then
You can’t perform that action at this time.
0 commit comments