Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: alias bug on solaris machines
- X-seq: zsh-users 12341
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: alias bug on solaris machines
- Date: Thu, 20 Dec 2007 08:24:00 -0800
- In-reply-to: <200712201405.lBKE5F0v005899@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20071220134602.GB19213@xxxxxxxxx> <200712201405.lBKE5F0v005899@xxxxxxxxxxxxxx>
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