zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: not an error?
Date: Thu, 8 Oct 2015 13:14:54 -0700	[thread overview]
Message-ID: <151008131454.ZM4209@torch.brasslantern.com> (raw)
In-Reply-To: <5616CA62.20604@eastlink.ca>

On Oct 8, 12:56pm, Ray Andrews wrote:
}
} ... do you ever really need the outer quotes around an array like that?

As usual it depends on the context.  Zsh in "native" emulation handles
array expansions differently than other shells, so most of the time you
don't need quotes -- but if you want to train yourself to write shell
code in a way that's portable to other shells, it's better to get used
to quoting.

On the other hand if you're using ${(k)...} then that's already not
portable.

There are cases (mostly involving nested expansions) where you need the
quotes to get the right interpretation.


      reply	other threads:[~2015-10-08 20:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08  7:51 Matching beginning and end of word Sebastian Gniazdowski
2015-10-08  9:23 ` Peter Stephenson
2015-10-08 16:46   ` Bart Schaefer
2015-10-08 17:44     ` not an error? Ray Andrews
2015-10-08 19:22       ` Bart Schaefer
2015-10-08 19:56         ` Ray Andrews
2015-10-08 20:14           ` Bart Schaefer [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=151008131454.ZM4209@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).