From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13072 invoked by alias); 4 Dec 2014 18:42:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19497 Received: (qmail 26589 invoked from network); 4 Dec 2014 18:42:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=AduIQRnG c=1 sm=1 tr=0 a=jdSWnw68wQxqFMiqtgVC2A==:117 a=jdSWnw68wQxqFMiqtgVC2A==:17 a=G8GL833Es-AA:10 a=N659UExz7-8A:10 a=jHoVmT1w4myQUiZreWkA:9 a=pILNOxqGKmIA:10 Message-id: <5480AB10.4010209@eastlink.ca> Date: Thu, 04 Dec 2014 10:42:24 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: triviality with prompts References: <547E568C.6070607@eastlink.ca> <141202190200.ZM31930@torch.brasslantern.com> <547E9158.6050103@eastlink.ca> <9CD0DDE8-21AB-4EA3-A69F-9B338ECC83F1@macports.org> <547F385B.3070405@eastlink.ca> <20141203164353.GO23965@isis.sigpipe.cz> <547F441E.6060606@eastlink.ca> <547F9939.9060303@eastlink.ca> <141203210607.ZM7622@torch.brasslantern.com> In-reply-to: <141203210607.ZM7622@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit 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. > 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 " [] "?