zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: triviality with prompts
Date: Thu, 04 Dec 2014 10:42:24 -0800	[thread overview]
Message-ID: <5480AB10.4010209@eastlink.ca> (raw)
In-Reply-To: <141203210607.ZM7622@torch.brasslantern.com>

On 12/03/2014 09:06 PM, Bart Schaefer wrote:
> On Dec 3,  3:14pm, Ray Andrews wrote:
> } Subject: Re: triviality with prompts
> }
> } \
> } ' '
> } " "
> } $' '
> } $( )
> }
> } ... all cross-pollinating each other in various ways, but is that it for
> } the main species?
>
> $( ) is substitution, not quoting.  It is true that if you have both
> outer double quotes and a $( ) inside them, then the rules for parsing
> command substitution take over until the matching close-paren is found;
> but otherwise nothing is quoted differently just because it is inside
> a command substitution.
>
> } Oh, and of course there's the various flavorings like 'rc_quotes' and
> } I guess a few others like that.  Tractable.
>
> The other major one is aritmetic evaluation in (( )) where everything
> behaves as if double quoted, and then there are the special cases in
> parameter subscript expressions, which can get a bit strange but in
> practice you'll almost never run into.
>
<ignorable-philosophical-musing>

Thinking about all that, I find my self still fuzzy.  What do we really mean
by 'quote'?  It's a delineated block of characters in which some prescribed
semantics will apply. So "   $()   " is also a delineated block of 
characters
in which some prescribed semantics will apply,  ditto "  (())   " and
"   [[]]  ", yes?  So, what's so special about what we call 'quoting'?  
Maybe
what I'm reaching for with the list above is a complete list of
'delineators'.  So, if one had such a list, one could learn the syntactic
rules inside each one in a tractable way.  Maybe the whole idea of 'quote'
is not so special, it's just two or three of the many more ways that zsh
will process a delineated block of characters.  The only thing 'special'
about it is that the delineators are the keyboard characters that we call
quotation marks, thus we are 'quoting'.  Or is quoting really,
syntactically, a different 'kind'  of thing than "  $()  "  or " []  "?



  reply	other threads:[~2014-12-04 18:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  0:17 Ray Andrews
2014-12-03  3:02 ` Bart Schaefer
2014-12-03  4:28   ` Ray Andrews
2014-12-03  4:38     ` Lawrence Velázquez
2014-12-03 16:20       ` Ray Andrews
2014-12-03 16:43         ` Roman Neuhauser
2014-12-03 17:10           ` Ray Andrews
2014-12-03 17:39             ` Roman Neuhauser
2014-12-03 21:14             ` Bart Schaefer
2014-12-03 23:14               ` Ray Andrews
2014-12-04  5:06                 ` Bart Schaefer
2014-12-04 18:42                   ` Ray Andrews [this message]
2014-12-06 21:28                     ` Bart Schaefer
2014-12-07  0:37                       ` Ray Andrews
2014-12-03 21:16         ` Lawrence Velázquez
2014-12-03 21:22         ` Bart Schaefer
2014-12-03 23:40           ` 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=5480AB10.4010209@eastlink.ca \
    --to=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).