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

Re: behavior of in-line variable assignments preceding functions, special built-ins

On Thu, 2 May 2013 14:44:17 -0700 (PDT)
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> I haven't worked out whether the change described below renders zsh's
> assignment behavior non-conforming.

Nothing major, by the looks of things: it looks like a tightening up of
corner cases.  I suppose we really need a .ztst to test it all
thoroughly, which shouldn't be hard to put together, although rather

It's not entirely clear to me whether "a standard utility implemented as
a function" applies if the user decides to create a function to take
over a builtin, but I would think that isn't the intention --- the
intention must surely be the user knows how the bare system works.
That's certainly my reading of the referenced section 4.21,

  The system may implement certain utilities as shell functions (see XCU
  Function Definition Command) or built-in utilities, but only an
  application that is aware of the command search order (as described in
  XCU Command Search and Execution) or of performance characteristics
  can discern differences between the behavior of such a function or
  built-in utility and that of an executable file

so I don't think that applies to zsh.

I notice it's already the case that functions behave like special
builtins in many respects.  I can't remember ever checking that
explicitly (but the number of things I can't remember doing is

Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/

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