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

Re: alias bug on solaris machines



On Dec 20,  2:05pm, Peter Stephenson wrote:
} Subject: Re: alias bug on solaris machines
}
} That's actually expected behaviour.  It's documented that aliases that
} end with a space cause the following word to be expanded as an alias.
} Since GREPCOLOR is empty, the alias for grep does end with a space.
} 
} You ought to do something like
} 
}   [[ -n $GREPCOLOR ]] && alias grep="grep $GREPCOLOR"

Or just

    alias grep='grep $GREPCOLOR'

(single quotes) which would wait to expand the variable until the time
grep is run, which seems more like what you'd want anyway.



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