Skip to content

Commit

Permalink
[Refactor] Reduce one more sed & pipe to speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Apr 18, 2018
1 parent e7b4219 commit ecbbc10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1035,9 +1035,9 @@ nvm_ls() {
\\#${SEARCH_PATTERN}# !d;
" \
-e 's#^\([^/]\{1,\}\)/\(.*\)$#\2.\1#;' \
-e 's#\(.*\)\.\([^\.]\{1,\}\)$#\2-\1#;' \
-e "s#^${NVM_NODE_PREFIX}-##;" \
| command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n \
| command sed -e 's#\(.*\)\.\([^\.]\{1,\}\)$#\2-\1#;' \
-e "s#^${NVM_NODE_PREFIX}-##;" \
)"
fi

Expand Down

0 comments on commit ecbbc10

Please sign in to comment.