Add --color=[always|never|auto] argument; fix color when piping (#3013)
* Disable spec colorization when redirecting stdout and add command line flag to re-enable * Add command line `--color` flag to control output colorization * Add options to `llnl.util.tty.color` to allow color to be auto/always/never * Add `Spec.cformat()` function to be used when `format()` should have auto-coloring
This commit is contained in:

committed by
Todd Gamblin

parent
f3c70c235c
commit
1c7e5724d9
@@ -115,7 +115,8 @@ function _spack {
|
||||
if $list_options
|
||||
then
|
||||
compgen -W "-h --help -d --debug -D --pdb -k --insecure -m --mock -p
|
||||
--profile -v --verbose -s --stacktrace -V --version" -- "$cur"
|
||||
--profile -v --verbose -s --stacktrace -V --version
|
||||
--color --color=always --color=auto --color=never" -- "$cur"
|
||||
else
|
||||
compgen -W "$(_subcommands)" -- "$cur"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user