From: Colin Patrick McCabe Date: Mon, 27 Sep 2010 17:33:55 +0000 (-0700) Subject: .bashrc: test if ls --color works before aliasing X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14cc81b82cb640c7cb91b2d3063769ab04cf3280;p=cmccabe-etc .bashrc: test if ls --color works before aliasing --- diff --git a/.bashrc b/.bashrc index 6e3606e..b0df65b 100644 --- a/.bashrc +++ b/.bashrc @@ -23,7 +23,7 @@ xlock2() { case $- in *i*) # interactive shell - alias ls='ls --color=auto' + ls --color /tmp &>/dev/null && alias ls='ls --color=auto' alias mv='mv -i' alias vi='vim' alias wget='wget --user-agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"'