From: tfheen Date: Sat, 2 Jun 2007 07:29:50 +0000 (+0000) Subject: Use --color with if available X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6332aeb6edc9d8872220fe25dd5e5b2d0d185d88;p=dotfiles Use --color with if available git-svn-id: file:///svn/tfheen/trunk/dotfiles@1013 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/environment b/environment index 3c3bb19..aa2ccfe 100644 --- a/environment +++ b/environment @@ -10,6 +10,11 @@ if [ `uname -s` = "FreeBSD" ] && alias | grep -q "ls="; then unalias ls fi +GREP_OPTIONS= +for grepopt in --colour; do + grep -q $grepopt . /etc/passwd && GREP_OPTIONS="$GREP_OPTIONS $grepopt" +done + findcommand() { while [ "$#" -ge 1 ]; do P="$PATH" @@ -240,3 +245,4 @@ removepathelem "\\." export LS_OPTIONS CVSROOT EDITOR TZ WWW_HOME LESSOPEN LESS RSYNC_RSH export CVS_RSH PILOTPORT PILOTRATE LANG DEBEMAIL CVSEDITOR ldlib export HOSTNAME DOMAINNAME PATH EMAIL XTERM SVN_EDITOR GNUSTEP_USER_ROOT +export GREP_OPTIONS