From 1c7e5724d9ff90b27f31faffd712867520e400c6 Mon Sep 17 00:00:00 2001 From: paulhopkins Date: Mon, 31 Jul 2017 20:57:47 +0100 Subject: 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 --- share/spack/spack-completion.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'share') diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index d9ae65b8b5..e60d587c18 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -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 -- cgit v1.2.3-70-g09d2