zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: behavior of in-line variable assignments preceding functions, special built-ins
Date: Sat, 4 May 2013 14:39:42 +0100	[thread overview]
Message-ID: <20130504143942.0ece2d0e@pws-pc.ntlworld.com> (raw)
In-Reply-To: <alpine.LRH.2.00.1305021441320.23667@toltec.zanshin.com>

On Thu, 2 May 2013 14:44:17 -0700 (PDT)
Bart Schaefer <schaefer@brasslantern.com> 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
dull.

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
considerable).

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


      reply	other threads:[~2013-05-04 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 21:44 Bart Schaefer
2013-05-04 13:39 ` Peter Stephenson [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=20130504143942.0ece2d0e@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /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).