diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-25 16:42:09 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-25 16:42:09 +1200 |
commit | caef6de0c29c491c43d8fa12197ef6c03c5f8c6d (patch) | |
tree | 7b07ab738b2968e9b62066d900d390bece11e17e | |
parent | Commit Sahara updates (diff) | |
download | dotfiles-caef6de0c29c491c43d8fa12197ef6c03c5f8c6d.tar.gz dotfiles-caef6de0c29c491c43d8fa12197ef6c03c5f8c6d.zip |
Use color=auto for ls and grep coloring.
Forgot to include this as defined in the stock .bashrc file for Debian.
It prevents control codes for terminal colors from being piped into
tools like less.
-rw-r--r-- | bash/bashrc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc index 5e7d37d0..2e95c73e 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -46,7 +46,7 @@ PS2='...' LS_OPTS= if ls --help | grep -- --color &>/dev/null; then hash dircolors &>/dev/null && eval "$(dircolors -b)" - LS_OPTS="$LS_OPTS --color" + LS_OPTS="$LS_OPTS --color=auto" fi alias ls="ls $LS_OPTS" @@ -63,7 +63,7 @@ if grep --help | grep -- --exclude-dir &>/dev/null; then done fi if grep --help | grep -- --color &>/dev/null; then - GREP_OPTS="$GREP_OPTS --color" + GREP_OPTS="$GREP_OPTS --color=auto" fi alias grep="grep $GREP_OPTS" |