zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Documentation on (A) Create array parameter
Date: Wed, 22 Feb 2017 11:58:02 -0800	[thread overview]
Message-ID: <170222115802.ZM18878@torch.brasslantern.com> (raw)
In-Reply-To: <1487763613.2941773.889107120.2750751A@webmail.messagingengine.com>

On Feb 22,  3:40am, Sebastian Gniazdowski wrote:
}
} (A) completion and documentation suggest straight creation:

There's no such thing as "straight creation" of a parameter; the whole
shell model depends on dynamic scoping.  Assignments *always* apply to
any parameter that is already in scope, the only way to change that is 
by declaring the parameter with typeset/local/etc.

Furthermore, this specific instance is with reference to the earlier
documentation for ${NAME=WORD} et al. which says:

     In the first form, if NAME is unset then set it to WORD; in the
     second form, if NAME is unset or null then set it to WORD; and in
     the third form, unconditionally set NAME to WORD.

There'd be no point in calling out the difference between set, unset,
and set but null parameters if they were being "created" in the way you
have interpreted it here.

So if the use of the word "create" here is actually confusing, it's
that word that should be changed; clarifying semantics of dynamic
scoping is something for a much larger context.  Would it have led you
astray if instead the paragraph said "Assign as an array parameter ..." ?


  reply	other threads:[~2017-02-22 19:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 11:40 Sebastian Gniazdowski
2017-02-22 19:58 ` Bart Schaefer [this message]
2017-02-22 20:47   ` Sebastian Gniazdowski

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=170222115802.ZM18878@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).