mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-03 02:56:31 +00:00
Compare commits
2 Commits
71cbd508f1
...
fix-3474
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4f91e99415 | ||
![]() |
f7363acbb9 |
@@ -588,9 +588,7 @@ Run [`npx nvmrc`](https://npmjs.com/nvmrc) to validate an `.nvmrc` file. If that
|
|||||||
|
|
||||||
### Deeper Shell Integration
|
### Deeper Shell Integration
|
||||||
|
|
||||||
You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into your shell and automatically invoke `nvm` when changing directories. `avn` is **not** supported by the `nvm` maintainers. Please [report issues to the `avn` team](https://github.com/wbyoung/avn/issues/new).
|
You can use [`nvshim`](https://github.com/iamogbz/nvshim) to shim the `node`, `npm`, and `npx` bins to automatically use the `nvm` config in the current directory. `nvshim` is **not** supported by the `nvm` maintainers. Please [report issues to the `nvshim` team](https://github.com/iamogbz/nvshim/issues/new).
|
||||||
|
|
||||||
You can also use [`nvshim`](https://github.com/iamogbz/nvshim) to shim the `node`, `npm`, and `npx` bins to automatically use the `nvm` config in the current directory. `nvshim` is **not** supported by the `nvm` maintainers. Please [report issues to the `nvshim` team](https://github.com/iamogbz/nvshim/issues/new).
|
|
||||||
|
|
||||||
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` maintainers. We are, however, accepting pull requests for more examples.
|
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` maintainers. We are, however, accepting pull requests for more examples.
|
||||||
|
|
||||||
|
4
nvm.sh
4
nvm.sh
@@ -1667,10 +1667,11 @@ EOF
|
|||||||
LTS="${LTS#lts/}"
|
LTS="${LTS#lts/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSIONS="$({ command awk -v lts="${LTS-}" '{
|
VERSIONS="$({ command awk -v lts="${LTS-}" -v pattern="${PATTERN:-.*}" '{
|
||||||
if (!$1) { next }
|
if (!$1) { next }
|
||||||
if (lts && $10 ~ /^\-?$/) { next }
|
if (lts && $10 ~ /^\-?$/) { next }
|
||||||
if (lts && lts != "*" && tolower($10) !~ tolower(lts)) { next }
|
if (lts && lts != "*" && tolower($10) !~ tolower(lts)) { next }
|
||||||
|
if ($1 !~ pattern) { next }
|
||||||
if ($10 !~ /^\-?$/) {
|
if ($10 !~ /^\-?$/) {
|
||||||
if ($10 && $10 != prev) {
|
if ($10 && $10 != prev) {
|
||||||
print $1, $10, "*"
|
print $1, $10, "*"
|
||||||
@@ -1682,7 +1683,6 @@ EOF
|
|||||||
}
|
}
|
||||||
prev=$10;
|
prev=$10;
|
||||||
}' \
|
}' \
|
||||||
| nvm_grep -w "${PATTERN:-.*}" \
|
|
||||||
| $SORT_COMMAND; } << EOF
|
| $SORT_COMMAND; } << EOF
|
||||||
$VERSION_LIST
|
$VERSION_LIST
|
||||||
EOF
|
EOF
|
||||||
|
Reference in New Issue
Block a user