From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1628 invoked from network); 17 Jun 2002 06:12:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Jun 2002 06:12:36 -0000 Received: (qmail 20394 invoked by alias); 17 Jun 2002 06:12:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5063 Received: (qmail 20361 invoked from network); 17 Jun 2002 06:12:23 -0000 Date: Sun, 16 Jun 2002 23:12:13 -0700 From: william@hq.newdream.net (Will Yardley) To: zsh-users@sunsite.dk Subject: Re: .zshrc help... Message-ID: <20020617061213.GB10970@hq.newdream.net> Mail-Followup-To: zsh-users@sunsite.dk References: <20020617052841.GD30974@hq.newdream.net> <20020617055557.GE81446@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020617055557.GE81446@dan.emsphone.com> Organization: New Dream Network User-Agent: Mutt/1.5.1i Dan Nelson wrote: > In the last episode (Jun 16), Will Yardley said: > > FreeBSD's most recent release has changed the format for the LSCOLORS > > variable. > > > > with that in mind, i need some help adjusting my generic .zshrc. > > > > i currently use something like this (stolen from someone else) to adjust > > stuff based on my ZSH_VERSION: > > > > if [[ $ZSH_VERSION == 3.1.<5->* || $ZSH_VERSION == 3.<2->* || > > $ZSH_VERSION == <4->* ]]; then > > > > i'd like to do something similar to this (in concept; obviously it has > > to be something more complex than this). a good (but simple) > > discsussion of the syntax above would also be helpful.... > > > > if [ $(uname -r) <= 4.5 ]; then > > LSCOLORS="3x5x2x3x1x464301060203" > > elif [ $(uname -r) >= 4.6 ]; then > > LSCOLORS="dxfxBxcxbxegedabagacad" > > fi > > You could use the is-at-least function (included with zsh 3.1.6 and > newer): just in case, i would like to avoid using something that's version-dependent if possible... that seems to work though. 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 ;; -- Will Yardley input: william < @ hq . newdream . net . >