ryenus and Jordan Harband
301cfa12d6
avoid inline initialization for ksh compatibility
...
Co-authored-by: Jordan Harband <ljharb@gmail.com >
2025-03-12 16:47:31 +08:00
ryenus
c5a62d4228
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.
2025-03-12 16:47:31 +08:00
ryenus
797abf0b44
always show updates for installed versions
...
even if they're older than $NVM_MIN
2025-03-12 16:47:31 +08:00
ryenus
227bcdf5ac
remove function ref duplication
2025-03-12 16:47:31 +08:00
ryenus
87049f38e4
prefixed versions like v18 also work
2025-03-12 16:47:31 +08:00
ryenus
9d0735dc7f
rename NVM_MIN_VER to NVM_MIN
...
since nvm is all about versions, so no need for the explicit suffix.
2025-03-12 16:47:31 +08:00
ryenus
03aea1ad61
trim leading space in mock output due to eclint errors
2025-03-12 16:47:31 +08:00
ryenus
cabc668e48
add test for NVM_MIN_VER support
...
show only versions newer than NVM_MIN_VER if set
2025-03-12 16:47:31 +08:00
ryenus
90dadd0960
always list installed versions
2025-03-12 16:47:31 +08:00
ryenus
94a67893b3
show only versions newer than NVM_MIN_VER if set
2025-03-12 16:47:31 +08:00
ryenus
095a4ca655
[Fix] debug: awk: not an option: --version
...
On Debian, the default awk/mawk doesn't support the '--version' option;
instead there's mawk-specific '-W version'.
2022-10-21 16:48:00 +08:00
ryenus
9721791563
[Fix] grep: warning: stray \ before /
...
No need to escape the `/` char in a grep pattern.
This is to fix the below error when using newer grep with `nvm_command_info`
> $ nvm_command_info curl
> grep: warning: stray \ before /
> /usr/bin/curl
This happens with at least GNU grep 3.8 version.
2022-10-20 10:49:43 +08:00
ryenus
89d6cdd6cf
[Fix] improve backward compatibility for non-gnu awk
...
Adding function alen(arr) since length(arr) is GNU extension.
Fixes #2916
2022-10-18 11:25:12 +08:00
ryenus
5e9791c4f8
[perf] nvm_print_versions: re-implement using awk
...
reducing `nvm ls-remote` from almost 20s to below 2s.
Signed-off-by: ryenus <ryenus@gmail.com >
2022-06-05 13:27:03 +08:00