zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Pete Fritchman <petef@databits.net>, zsh-workers@sunsite.dk
Subject: Re: bug with aliases and declaring functions
Date: Tue, 30 Aug 2005 15:21:08 +0000	[thread overview]
Message-ID: <1050830152108.ZM19820@candle.brasslantern.com> (raw)
In-Reply-To: <20050830010813.BEF5357B2D@hex.databits.net>

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.


      reply	other threads:[~2005-08-30 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30  1:08 Pete Fritchman
2005-08-30 15:21 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1050830152108.ZM19820@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=petef@databits.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).