zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: syntactic question
Date: Fri, 21 Nov 2014 13:29:54 -0800	[thread overview]
Message-ID: <CAH+w=7ay7Mr8vdUtTZqo1voRg5vpMaGXEt8207h8cpErMqByKw@mail.gmail.com> (raw)
In-Reply-To: <546F9F41.8040608@eastlink.ca>

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

On Nov 21, 2014 12:25 PM, "Ray Andrews" <rayandrews@eastlink.ca> wrote:
>
> I've always thought that all parsing systems work from the 'inside out'
> which is to say that (as with math) you 'do' the deepest parenthesis
> first, and then work outward.

Quotes aren't parens, there is no left and right so you can't nest them the
way you are thinking of.  With only a small number of exceptions, quoting
in shells works left to right - once a quote is open, you obey only the
rules of that type of quote until it closes again.  Backslashes happen to
have special meaning both inside and outside of quotes, but the details
depend on which type of quote is active.

> In the same spirit, I'm expecting
> the substitution to do what it does following it's own rules and
> nevermind any quotations or anything else 'further out'.

Substitution occurs if there are no quotes or inside double quotes, but not
inside single quotes.  The rules are different when in double quotes, and
documented.

  reply	other threads:[~2014-11-21 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 20:23 Ray Andrews
2014-11-21 21:29 ` Bart Schaefer [this message]
2014-11-21 23:46   ` Ray Andrews
2014-11-22  0:00     ` Bart Schaefer
2014-11-22  1:40       ` Ray Andrews
2014-11-21 21:42 ` Kurtis Rader
2014-11-21 23:45   ` Bart Schaefer
2014-11-22  4:39     ` Ray Andrews

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='CAH+w=7ay7Mr8vdUtTZqo1voRg5vpMaGXEt8207h8cpErMqByKw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --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).