diff options
-rw-r--r-- | bash/bashrc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc index 070f86ab..af5427ab 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -39,8 +39,8 @@ PS2='...' # Use colors for ls and grep, if available. if [ -x /usr/bin/dircolors ]; then eval "$(dircolors -b)" - alias ls='ls --color=auto' - alias grep='grep --color=auto' + ls --help | grep -q -- --color && alias ls='ls --color=auto' + grep --help | grep -q -- --color && alias grep='grep --color=auto' fi # Use completion, if available. |