zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: Expanding quotes
Date: Tue, 24 Dec 2013 09:18:33 -0800	[thread overview]
Message-ID: <52B9C1E9.2050000@eastlink.ca> (raw)
In-Reply-To: <l9ccg9$fuo$1@ger.gmane.org>

On 24/12/13 08:24 AM, Yuri D'Elia wrote:
> On 12/24/2013 04:12 PM, Ray Andrews wrote:
>> file name   .................. two identifiers so ...
>> "file name" .................. is the filename  ... << file name >> or
>> are the double quotes include in the filename so that the filename is
>> ....  << "file name" >> ?
>>
>> Madness!
>>
>> Granted I'm still a relative beginner, but it seems to me that the
>> syntax of zsh (all sh*) is already vastly over complicated, even
>> Byzantine.  As more and more special situations are handled, the code
>> must mushroom into an intractable mess, and actually create more
>> problems than it solves.  Better IMHO not to even try.
> Quoting is invariably part of any language construct.
Of course.
> It's really important, especially as a beginner, to understand quoting
> right from the start as a "normal event", not as an exception.
Of course.
> Restricting the allowed characters of a file in the file system will not
> remove quoting issues of a variable's value (for example).
>
> To wrap your mind against it, you might see quoting as a problem for the
> interpreter to *separate arguments* and not to interpret data. That is,
> if we could choose # as an argument separator, we could have any
> character in the file name except #. It just so happens that it's
> /usually/ more readable to type:
That's just the point: There must be reserved characters, and it seems 
to me that quotation marks are first on that list.   Also, as a policy, 
I prefer simplicity with some resulting limitations on what can be done, 
over complicated efforts to do 'anything'.  It's just as Bart said, some 
issues are better left 'unsolved'. The solution could be worse than the  
problem.  I think back to my DOS days, where almost all of the 'special' 
characters were reserved--it sure made things simpler.
> $ command argument "a value"
>
> then
>
> $ command#argument#a value
>
> Just my 2c.
>
And mine ;-) I come at this, not as a zsh expert, but as a guy who knows 
something about information theory. Noam Chomsky would have something to 
say about this sort of issue.
>


  reply	other threads:[~2013-12-24 17:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 14:48 Yuri D'Elia
2013-12-17 18:26 ` Bart Schaefer
2013-12-23 17:38   ` Yuri D'Elia
2013-12-23 19:15     ` Bart Schaefer
2013-12-24 15:12       ` Ray Andrews
2013-12-24 16:24         ` Yuri D'Elia
2013-12-24 17:18           ` Ray Andrews [this message]
2013-12-26 14:50             ` Yuri D'Elia
2013-12-26 19:54               ` Ray Andrews
2013-12-24 16:11       ` Yuri D'Elia
2013-12-25  6:59         ` Bart Schaefer

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=52B9C1E9.2050000@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).