zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Peter Stephenson <p.stephenson@samsung.com>,
	Zsh Users <zsh-users@zsh.org>
Subject: Re: Is outer quoting not needed (docs say "redundant")?
Date: Wed, 13 Dec 2017 08:00:51 +0100	[thread overview]
Message-ID: <etPan.5a30d023.6d8c1390.c73c@zdharma.org> (raw)
In-Reply-To: <20171212150024.13a1e78b@pwslap01u.europe.root.pri>

On 12 Dec 2017 at 16:00:24, Peter Stephenson (p.stephenson@samsung.com) wrote:
> the substitution. So if necessary they will flag up the fact that the
> internal expression is double quoted. But because the parameter
> substitution in this case is already double quoted, they have no
> additional effect.
> 
> There may be a better example to use in the manual: the example here
> uses the "@" flag for splitting, which is only meaningful if the outer
> quotes are present. But it does have the use of pointing out that
> the double quotes are nested --- which might not be obvious, you
> might naively think the "${" and "}" were in two different
> double-quoted expressions.

Yes the example shows this and that's why I'd keep it. Going further, I once had serious doubts about such quotings overlapping. Digged out a code:

gitout=( "${(@f)"$( "${gitcmd[@]}" )"}" )

Is it the same? Top-level quotes mark ${gitcmd[@]} as quoted, so splitting, etc. is done regardless of bottom quoting, but each quoting is kept separate and they don't interact when they are parsed?

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org


  reply	other threads:[~2017-12-13  7:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171212135535epcas4p2456a2aed9c9be07c9d461acb602b71e9@epcas4p2.samsung.com>
2017-12-12 13:41 ` Sebastian Gniazdowski
2017-12-12 15:00   ` Peter Stephenson
2017-12-13  7:00     ` Sebastian Gniazdowski [this message]
2017-12-13 11:34       ` Peter Stephenson
2018-01-13 16:50         ` Sebastian Gniazdowski
2018-01-13 17:36           ` Bart Schaefer
     [not found]           ` <etPan.5a5a45ec.3309bd20.14e5a@AirmailxGenerated.am>
2018-01-14  4:03             ` 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=etPan.5a30d023.6d8c1390.c73c@zdharma.org \
    --to=psprint@zdharma.org \
    --cc=p.stephenson@samsung.com \
    --cc=zsh-users@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).