zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: Question on unintuitive behaviour for function execution and parameter assignment
Date: Wed, 13 Oct 2021 10:10:36 +0100 (BST)	[thread overview]
Message-ID: <486040678.536915.1634116236077@mail2.virginmedia.com> (raw)
In-Reply-To: <6uviEgEHuYei0UyfGfR_mqJvrNcXyJ5zfUwrQViRtmWwGeZwRR1C26lsUK9_D-V_GzCg5cG2gQ2IwHxScwLySDcy71rAa2RMpK5XF8BvtkE=@pm.me>


> On 13 October 2021 at 09:42 Jett Husher <jetthusher@pm.me> wrote:
> On Tuesday, October 12th, 2021 at 10:31, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> > This is covered by the POSIX_BUILTINS option. Generally, the POSIX_* options are
> >
> > the place to look for this sort of think --- granted that can be a bit of hunt.
> 
> I wouldn't even think to look at POSIX_* variables because POSIX-2017
> explicitly tells that it's unspecified "Whether or not the variable assignments persist after
> the completion of the function", so, naturally, I though that this behaviour was compliant.

It's always worth (everyone) bearing in mind that zsh is not a POSIX shell by default.

In fact, it's not *completely* POSIX even in sh emulation, as this has been gradually
retrofitted, and not everything can be done within the current constraints.

cheers
pws


      reply	other threads:[~2021-10-13  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  8:20 Jett Husher
2021-10-12  8:31 ` Peter Stephenson
2021-10-13  8:42   ` Jett Husher
2021-10-13  9:10     ` 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=486040678.536915.1634116236077@mail2.virginmedia.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).