DASH Shell discussions
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: dash@vger.kernel.org
Subject: Re: `local' built-in POSIX?
Date: Sat, 26 Mar 2011 16:56:20 -0600	[thread overview]
Message-ID: <4D8E6F14.4050600@redhat.com> (raw)
In-Reply-To: <AANLkTimpYYu8toHmxwTtG2GmqE90d59OLgyQ+qcaoRnr@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

On 03/26/2011 04:50 PM, Michael Witten wrote:
> I can't find POSIX documentation for the `local' built-in, which is
> available in both dash and bash for the creation of function-local
> variables.
> 
> Is it not standard POSIX? If it is not, should it be removed from dash?

No, it is not standard POSIX (yet).  There has been talk on the Austin
Group mailing list of standardizing local (perhaps by the name typeset)
for the next revision; the biggest issue is that ksh uses typeset only
for statically scoped variables, while bash uses it only for dynamically
scoped variables, so a consensus has to be reached among shell writers
which scoping rules to standardize.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

      reply	other threads:[~2011-03-26 22:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 22:50 `local' built-in POSIX? Michael Witten
2011-03-26 22:56 ` Eric Blake [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=4D8E6F14.4050600@redhat.com \
    --to=eblake@redhat.com \
    --cc=dash@vger.kernel.org \
    --cc=mfwitten@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox