Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: aliases expanding aliases: a bug?
- X-seq: zsh-users 14623
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: aliases expanding aliases: a bug?
- Date: Tue, 01 Dec 2009 20:40:06 +0000
- In-reply-to: Message from Jay Berkenbilt <ejb@xxxxxx> of "Tue, 01 Dec 2009 15:00:53 EST." <20091201150051.0942597181.qww314159@xxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Jay Berkenbilt wrote:
> I just downloaded zsh 4.3.10, and I am able to reproduce this problem
> with that version. It appears that if an alias ends with a space,
> arguments that themselves happen to be aliases are expanded, at least in
> some cases.
See zshmisc. It's so you can do things like
alias noglob="noglob "
and have aliases expanded after that. People who regard "noglob" as
just a modifier might want alias expansion after it, others might not.
ALIASING
Every token in the shell input is checked to see if there is an alias
defined for it. If so, it is replaced by the text of the alias if it
is in command position (if it could be the first word of a simple com-
mand), or if the alias is global. If the text ends with a space, the
next word in the shell input is treated as though it were in command
position for purposes of alias expansion. An alias is defined using
the alias builtin; global aliases may be defined using the -g option to
that builtin.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author