From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7447 invoked from network); 17 Jun 2002 15:26:09 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Jun 2002 15:26:09 -0000 Received: (qmail 11709 invoked by alias); 17 Jun 2002 15:25:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5065 Received: (qmail 11694 invoked from network); 17 Jun 2002 15:25:36 -0000 Date: Mon, 17 Jun 2002 10:25:35 -0500 From: Dan Nelson To: zsh-users@sunsite.dk Subject: Re: .zshrc help... Message-ID: <20020617152535.GA77577@dan.emsphone.com> References: <20020617052841.GD30974@hq.newdream.net> <20020617055557.GE81446@dan.emsphone.com> <20020617061213.GB10970@hq.newdream.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020617061213.GB10970@hq.newdream.net> User-Agent: Mutt/1.3.99i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error In the last episode (Jun 16), Will Yardley said: > just in case, i would like to avoid using something that's > version-dependent if possible... that seems to work though. It is portable back to 3.0.7 (the oldest zsh I have). It was just not included in distributions until 3.1.6. The function is small; you can just stick it at the top of your script. > anyone see a problem with this (assuming that version numbers will > always be x.x)? > > case $(uname) in > [...] > FreeBSD) > MY_REV=$(uname -r | sed "s/-.*//") > if [[ $MY_REV == 4.<6-> ]]; then > LSCOLORS="dxfxBxcxbxegedabagacad" > else > LSCOLORS="3x5x2x3x1x464301060203" > fi > alias ls='ls -GF' > export LSCOLORS > ;; You probably want [[ $MY_REV == 4.<6-> || $MY_REV == <5->* ]] to match -current systems. Your code also has the side-effect of setting LSCOLORS on machines that do not cupport colors at all (like FreeBSD 3.5). -- Dan Nelson dnelson@allantgroup.com