Compare commits

..

15 Commits

Author SHA1 Message Date
ryenus
1f277a34bf
Merge 3e15282773717ade9e64eee6408bf882e9b803fa into ccf6d160172ab57f9777e88af5fa51240108285a 2024-11-04 15:08:35 +00:00
ryenus
3e15282773 set NVM_NO_COLORS to --no-colors to disable color 2024-10-18 23:13:10 +08:00
ryenus
060adbd05e rename min_ver to min for consistency 2024-10-18 23:13:10 +08:00
ryenus
08f28abbdd [test] avoid leaking temp variable 2024-10-18 23:13:10 +08:00
ryenus
1f3af439c3 ls-remote: introduce temp var for env inheritance
This is to inherit $NVM_MIN from env when defined, meanwhile avoiding
inline local variable initialization for ksh compatibility.

Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-10-18 23:13:10 +08:00
ryenus
686d33b066 avoid inline initialization for ksh compatibility
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2024-10-18 23:13:10 +08:00
ryenus
e77828a448 ls-remote: add CLI option --min=<version>
When omitted, fallback to the environment variable "NVM_MIN" if set.
And the CLI option --min=<version> takes precedence over the environment
variable "NVM_MIN" if both are present.
2024-10-18 23:13:10 +08:00
ryenus
2749487689 always show updates for installed versions
even if they're older than $NVM_MIN
2024-10-18 23:13:05 +08:00
ryenus
cb267d6302 remove function ref duplication 2024-10-08 20:20:10 +08:00
ryenus
646e3bb869 prefixed versions like v18 also work 2024-10-08 20:20:10 +08:00
ryenus
a2996f3b0e rename NVM_MIN_VER to NVM_MIN
since nvm is all about versions, so no need for the explicit suffix.
2024-10-08 20:20:10 +08:00
ryenus
4c67ced319 trim leading space in mock output due to eclint errors 2024-10-08 20:20:10 +08:00
ryenus
f4c2477a0b add test for NVM_MIN_VER support
show only versions newer than NVM_MIN_VER if set
2024-10-08 20:20:10 +08:00
ryenus
5b57613aac always list installed versions 2024-10-08 20:20:10 +08:00
ryenus
be4f15d833 show only versions newer than NVM_MIN_VER if set 2024-10-08 20:20:10 +08:00

5
nvm.sh
View File

@ -1925,11 +1925,6 @@ BEGIN {
output[m++] = formatted; output[m++] = formatted;
} }
skipped = rows - m + 1
if (skipped > 0) {
printf("[WARN] %d version(s) skipped.\n", skipped) > "/dev/stderr"
}
for (n = 1; n < m; n++) { for (n = 1; n < m; n++) {
print output[n] print output[n]
} }