diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-08 11:39:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-05-08 11:39:54 +1200 |
commit | ba7a8ef697c67fefad7c875ec3f2cd284787223c (patch) | |
tree | 605d361f100c7b1b35767a08cfee2fa5b9d97856 /bash | |
parent | Let's try this again. (diff) | |
download | dotfiles-ba7a8ef697c67fefad7c875ec3f2cd284787223c.tar.gz dotfiles-ba7a8ef697c67fefad7c875ec3f2cd284787223c.zip |
Hash dircolors, remove grep dependency.
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc index af5427ab..0f280084 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -37,11 +37,11 @@ PS1='\u@\h:\w\$ ' PS2='...' # Use colors for ls and grep, if available. -if [ -x /usr/bin/dircolors ]; then +if hash dircolors &>/dev/null; then eval "$(dircolors -b)" ls --help | grep -q -- --color && alias ls='ls --color=auto' - grep --help | grep -q -- --color && alias grep='grep --color=auto' fi +grep --help | grep -q -- --color && alias grep='grep --color=auto' # Use completion, if available. if [ -e /etc/bash_completion ]; then |