Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Expanding quotes
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.
It's really important, especially as a beginner, to understand quoting
right from the start as a "normal event", not as an exception.
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:
$ command argument "a value"
then
$ command#argument#a value
Just my 2c.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author