Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: .zshrc help...
- X-seq: zsh-users 5065
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: .zshrc help...
- Date: Mon, 17 Jun 2002 10:25:35 -0500
- In-reply-to: <20020617061213.GB10970@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020617052841.GD30974@xxxxxxxxxxxxxxx> <20020617055557.GE81446@xxxxxxxxxxxxxxxx> <20020617061213.GB10970@xxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author