diff options
-rw-r--r-- | bash/bashrc.d/gcc.bash | 19 | ||||
-rw-r--r-- | bash/bashrc.d/make.bash | 17 | ||||
-rw-r--r-- | sh/profile.d/gcc.sh | 3 |
3 files changed, 0 insertions, 39 deletions
diff --git a/bash/bashrc.d/gcc.bash b/bash/bashrc.d/gcc.bash deleted file mode 100644 index 9db34cdc..00000000 --- a/bash/bashrc.d/gcc.bash +++ /dev/null @@ -1,19 +0,0 @@ -# Define function wrapper for gcc(1) with --color option if GCC_COLORS is set; -# checks that color is available in the terminal within the function -if [[ ! -n $GCC_COLORS ]] ; then - return -fi - -# Define function proper -gcc() { - local -i colors - colors=$( { - tput Co || tput colors - } 2>/dev/null ) - if ((colors >= 8)) ; then - command gcc --color=auto "$@" - else - command gcc "$@" - fi -} - diff --git a/bash/bashrc.d/make.bash b/bash/bashrc.d/make.bash index 397ba944..df4c0f56 100644 --- a/bash/bashrc.d/make.bash +++ b/bash/bashrc.d/make.bash @@ -1,20 +1,3 @@ -# 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=$( { - tput Co || tput colors - } 2>/dev/null ) - if ((colors >= 8)) ; then - command make "$@" - else - ( unset -v GCC_COLORS ; command make "$@" ) - fi -} - # Completion setup for Make, completing targets _make() { local word diff --git a/sh/profile.d/gcc.sh b/sh/profile.d/gcc.sh deleted file mode 100644 index d60d0ac6..00000000 --- a/sh/profile.d/gcc.sh +++ /dev/null @@ -1,3 +0,0 @@ -GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' -export GCC_COLORS - |