Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with aliases and declaring functions
- X-seq: zsh-workers 21691
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Pete Fritchman <petef@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Subject: Re: bug with aliases and declaring functions
- Date: Tue, 30 Aug 2005 15:21:08 +0000
- In-reply-to: <20050830010813.BEF5357B2D@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050830010813.BEF5357B2D@xxxxxxxxxxxxxxxx>
On Aug 29, 6:08pm, Pete Fritchman wrote:
}
} So, my theory is that the zsh parser is
} re-writing 'foo() { echo func; }' to 'foo () { echo func; }' and then
} 'foo ' is seen at the beginning of the command, and foo's alias is
} substituted.
Yes, that's what's happening, as is explained in zsh FAQ #2.3, except
that it's a mistake to call it "re-writing."
The discussion of aliasing in the zsh manual says "Every token in the
shell input is checked ..." -- note that it says token, indicating that
aliasing is applied after lexical analysis, and that it specifically
does not say anything about requiring spaces to surround the token.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author