mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
indent awk script properly
This commit is contained in:
parent
fc4a98b771
commit
f28584cecf
12
nvm.sh
12
nvm.sh
@ -1888,11 +1888,11 @@ nvm_print_versions() {
|
||||
-v installed_color="$INSTALLED_COLOR" -v system_color="$SYSTEM_COLOR" \
|
||||
-v current_color="$CURRENT_COLOR" -v default_color="$DEFAULT_COLOR" \
|
||||
-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 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 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 {
|
||||
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 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; }
|
||||
BEGIN {
|
||||
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_current = has_colors ? (current_color ? "\033[" current_color "->%13s\033[0m" : "%15s") : "->%13s *";
|
||||
@ -1960,7 +1960,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
exit
|
||||
}'
|
||||
}'
|
||||
}
|
||||
|
||||
nvm_validate_implicit_alias() {
|
||||
|
Loading…
Reference in New Issue
Block a user