Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

.zshrc help...



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

note that uname -n reports a string like:

4.6-STABLE

do i need to strip out the '-STABLE' part (using sed or whatever) before
doing an arithmetic comparison?

-- 
Will Yardley
input: william < @ hq . newdream . net . >



Messages sorted by: Reverse Date, Date, Thread, Author