diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-06-19 15:44:23 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-06-19 15:44:23 +1200 |
commit | e90c03ab1a49a2acde7d7d66edd54acbdd1c50f2 (patch) | |
tree | 444752417bc74c895c3a1ea4de3f63c29455656d /bash/bashrc.d | |
parent | make(1) wrapper deals with *_COLORS vars (diff) | |
download | dotfiles-e90c03ab1a49a2acde7d7d66edd54acbdd1c50f2.tar.gz dotfiles-e90c03ab1a49a2acde7d7d66edd54acbdd1c50f2.zip |
Kid gloves only needed for GCC_COLORS
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/make.bash | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bash/bashrc.d/make.bash b/bash/bashrc.d/make.bash index 63ffa3f0..397ba944 100644 --- a/bash/bashrc.d/make.bash +++ b/bash/bashrc.d/make.bash @@ -1,6 +1,8 @@ -# Unset all my *_COLORS vars when invoking make(1) if terminal doesn't have -# color; I have to do this because my wrapper functions are ignored by the -# /bin/sh fork make(1) does +# Unset my GCC_COLORS vars when invoking make(1) if terminal doesn't have +# color; I have to do this because my wrapper function is ignored by the +# /bin/sh fork make(1) does, and gcc(1) always uses colors if the variable is +# set, as opposed to ls(1) and grep(1) which only do it if the --color option +# is specified appropriately. make() { local -i colors colors=$( { @@ -9,10 +11,7 @@ make() { if ((colors >= 8)) ; then command make "$@" else - ( - unset -v GCC_COLORS GREP_COLORS LS_COLORS - command make "$@" - ) + ( unset -v GCC_COLORS ; command make "$@" ) fi } |