summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorpaulhopkins <paulhopkins@users.noreply.github.com>2017-07-31 20:57:47 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2017-07-31 12:57:47 -0700
commit1c7e5724d9ff90b27f31faffd712867520e400c6 (patch)
tree5d6ff249782b04c4780954f2f17b86697dbffb3c /share
parentf3c70c235c3a1ef12b3fc9f35458e42228231016 (diff)
downloadspack-1c7e5724d9ff90b27f31faffd712867520e400c6.tar.gz
spack-1c7e5724d9ff90b27f31faffd712867520e400c6.tar.bz2
spack-1c7e5724d9ff90b27f31faffd712867520e400c6.tar.xz
spack-1c7e5724d9ff90b27f31faffd712867520e400c6.zip
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
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/spack-completion.bash3
1 files changed, 2 insertions, 1 deletions
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