[Refactor] Reduce one more `sed` & pipe to speedup
parent
6534568745
commit
e367533eb8
4
nvm.sh
4
nvm.sh
|
@ -1083,9 +1083,9 @@ nvm_ls() {
|
||||||
\\#${SEARCH_PATTERN}# !d;
|
\\#${SEARCH_PATTERN}# !d;
|
||||||
" \
|
" \
|
||||||
-e 's#^\([^/]\{1,\}\)/\(.*\)$#\2.\1#;' \
|
-e 's#^\([^/]\{1,\}\)/\(.*\)$#\2.\1#;' \
|
||||||
| command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n \
|
-e 's#\(.*\)\.\([^\.]\{1,\}\)$#\2-\1#;' \
|
||||||
| command sed -e 's#\(.*\)\.\([^\.]\{1,\}\)$#\2-\1#;' \
|
|
||||||
-e "s#^${NVM_NODE_PREFIX}-##;" \
|
-e "s#^${NVM_NODE_PREFIX}-##;" \
|
||||||
|
| command sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n \
|
||||||
)"
|
)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue