Skip to content

Commit 33e1b3d

Browse files
committed
gs-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.
1 parent 477d229 commit 33e1b3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nvm.sh

+5
Original file line numberDiff line numberDiff line change
@@ -3036,6 +3036,7 @@ nvm() {
30363036
nvm_echo ' nvm ls-remote [<version>] List remote versions available for install, matching a given <version> if provided'
30373037
nvm_echo ' --lts When listing, only show LTS (long-term support) versions'
30383038
nvm_echo ' --lts=<LTS name> When listing, only show versions for a specific LTS line'
3039+
nvm_echo ' --min=<version> When listing, only show versions greater than or equal to <version>, including minor/patch updates for installed versions'
30393040
nvm_echo ' --no-colors Suppress colored output'
30403041
nvm_echo ' nvm version <version> Resolve the given description to a single local version'
30413042
nvm_echo ' nvm version-remote <version> Resolve the given description to a single remote version'
@@ -4012,6 +4013,7 @@ nvm() {
40124013
;;
40134014
"ls-remote" | "list-remote")
40144015
local NVM_LTS
4016+
local NVM_MIN="${NVM_MIN-}"
40154017
local PATTERN
40164018
local NVM_NO_COLORS
40174019

@@ -4024,6 +4026,9 @@ nvm() {
40244026
--lts=*)
40254027
NVM_LTS="${1##--lts=}"
40264028
;;
4029+
--min=*)
4030+
NVM_MIN="${1##--min=}"
4031+
;;
40274032
--no-colors) NVM_NO_COLORS="${1}" ;;
40284033
--*)
40294034
nvm_err "Unsupported option \"${1}\"."

0 commit comments

Comments
 (0)