Make sure the new `versions` directory is filtered out of nvm_ls output (in zsh).
parent
7551746e55
commit
b59ecb9e11
2
nvm.sh
2
nvm.sh
|
@ -231,7 +231,7 @@ nvm_ls() {
|
|||
fi
|
||||
if [ -d "$(nvm_version_dir new)" ]; then
|
||||
VERSIONS=`find "$(nvm_version_dir new)/" "$(nvm_version_dir old)/" -maxdepth 1 -type d -name "$PATTERN*" -exec basename '{}' ';' \
|
||||
| sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n | \grep -v '^ *\.' | \grep -e '^v'`
|
||||
| sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n | \grep -v '^ *\.' | \grep -e '^v' | \grep -v -e '^versions$'`
|
||||
else
|
||||
VERSIONS=`find "$(nvm_version_dir old)/" -maxdepth 1 -type d -name "$PATTERN*" -exec basename '{}' ';' \
|
||||
| sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n | \grep -v '^ *\.' | \grep -e '^v'`
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir ../../../v0.1.3
|
||||
mkdir ../../../v0.2.3
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
mkdir ../../../versions
|
||||
|
||||
[ -z "$(nvm ls | \grep 'versions')" ]
|
||||
# The result should contain only the appropriate version numbers.
|
||||
|
||||
rmdir ../../../versions
|
||||
|
Loading…
Reference in New Issue