From: Valentin Samir Date: Mon, 22 Jul 2013 15:01:30 +0000 (+0200) Subject: [bash_aliases] colored aliases only if dircolors is executables X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=d6834d42190a39799613a676c644e7ddfd3795d3;p=config-20-100.git [bash_aliases] colored aliases only if dircolors is executables --- diff --git a/.bash_aliases b/.bash_aliases index ce5c6f4..9d47f37 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -22,10 +22,12 @@ alias cp='cp -i' alias df='df -h' # Affichage des couleurs automatiques -alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' -alias ls='ls --color=auto' +if [ -x /usr/bin/dircolors ]; then + alias grep='grep --color=auto' + alias egrep='egrep --color=auto' + alias fgrep='fgrep --color=auto' + alias ls='ls --color=auto' +fi # Alias ls alias ll='ls -alFh'