mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 20:13:44 +00:00
Compare commits
17 Commits
450f05bf0f
...
32dc1e4b3f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
32dc1e4b3f | ||
![]() |
3dd8beb6ea | ||
![]() |
c6bb417804 | ||
![]() |
ae8b033db9 | ||
![]() |
dbf7c3ed3c | ||
![]() |
b145f236a8 | ||
![]() |
794881332d | ||
![]() |
5cffcaf8f2 | ||
![]() |
1f1ea6f88c | ||
![]() |
1fbd8ca3dd | ||
![]() |
ea56ffda30 | ||
![]() |
c6492fd8ad | ||
![]() |
76c41c68b4 | ||
![]() |
b3148ae5c0 | ||
![]() |
cc2222cb1b | ||
![]() |
646d694379 | ||
![]() |
cedbb16256 |
21
nvm.sh
21
nvm.sh
@ -1862,11 +1862,11 @@ nvm_print_versions() {
|
|||||||
-v installed_color="$INSTALLED_COLOR" -v system_color="$SYSTEM_COLOR" \
|
-v installed_color="$INSTALLED_COLOR" -v system_color="$SYSTEM_COLOR" \
|
||||||
-v current_color="$CURRENT_COLOR" -v default_color="$DEFAULT_COLOR" \
|
-v current_color="$CURRENT_COLOR" -v default_color="$DEFAULT_COLOR" \
|
||||||
-v old_lts_color="$DEFAULT_COLOR" -v has_colors="$NVM_HAS_COLORS" '
|
-v old_lts_color="$DEFAULT_COLOR" -v has_colors="$NVM_HAS_COLORS" '
|
||||||
function alen(arr, i, len) { len=0; for(i in arr) len++; return len; }
|
function alen(arr, i, len) { len=0; for(i in arr) len++; return len; }
|
||||||
function v2a(v, a) { sub(/^(iojs-)?v/, "", v); split(v, a, "."); }
|
function v2a(v, a) { sub(/^(iojs-)?v/, "", v); split(v, a, "."); }
|
||||||
function v2m(v, a) { sub(/^(iojs-)?v/, "", v); split(v, a, "."); return a[1]; }
|
function v2m(v, a) { sub(/^(iojs-)?v/, "", v); split(v, a, "."); return a[1]; }
|
||||||
function vcmp(v1,v2,a1,a2,i,d) { v2a(v1,a1); v2a(v2,a2); for(i=1;i<4;i++) { d = a1[i] - a2[i]; if(d!=0) return d; } return 0; }
|
function vcmp(v1,v2,a1,a2,i,d) { v2a(v1,a1); v2a(v2,a2); for(i=1;i<4;i++) { d = a1[i] - a2[i]; if(d!=0) return d; } return 0; }
|
||||||
BEGIN {
|
BEGIN {
|
||||||
fmt_installed = has_colors ? (installed_color ? "\033[" installed_color "%15s\033[0m" : "%15s") : "%15s *";
|
fmt_installed = has_colors ? (installed_color ? "\033[" installed_color "%15s\033[0m" : "%15s") : "%15s *";
|
||||||
fmt_system = has_colors ? (system_color ? "\033[" system_color "%15s\033[0m" : "%15s") : "%15s *";
|
fmt_system = has_colors ? (system_color ? "\033[" system_color "%15s\033[0m" : "%15s") : "%15s *";
|
||||||
fmt_current = has_colors ? (current_color ? "\033[" current_color "->%13s\033[0m" : "%15s") : "->%13s *";
|
fmt_current = has_colors ? (current_color ? "\033[" current_color "->%13s\033[0m" : "%15s") : "->%13s *";
|
||||||
@ -1925,17 +1925,16 @@ 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]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rows > --m) {
|
||||||
|
printf("[INFO] showing %d (of %d) versions.\n", m, rows) > "/dev/stderr"
|
||||||
|
}
|
||||||
|
|
||||||
exit
|
exit
|
||||||
}'
|
}'
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm_validate_implicit_alias() {
|
nvm_validate_implicit_alias() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user