Files
nvm/test/fast
CJstate 3a72926f4a [Fix] nvm --help: render the set-colors legend in color
Every legend line is built inside a command substitution,
where `nvm_has_colors` can never succeed,
because `[ -t 1 ]` sees the capture pipe rather than the terminal.
The legend has therefore always printed plain,
on every terminal and in every shell.

Resolve color support once and pass it in,
the way `nvm_print_alias_path` already accepts the same flag.
A command-prefix assignment cannot carry it:
POSIX expands a command's arguments before applying its assignments,
so the substitutions would still see it unset,
and in sh and ksh it would outlive the call and override `--no-colors` for everything after.

The test needs no tty,
and fails against an unfixed `nvm.sh` in sh, bash, dash, and zsh.

Fixes #3896
2026-09-03 12:10:19 -07:00
..