Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Expanding quotes



On 23/12/13 11:15 AM, Bart Schaefer wrote:
and expect completion to *supply* the missing backslash, because there
is a file name ending with a quote.  It gets even more complicated if
the backslash is inside another set of quotes, etc.  We spent quite a
lot of time (years ago) responding to complaints about this kind of thing
before finally concluding that we couldn't please everybody and should
stick with making the common cases work.

Pardon for wandering off on a philosophical rant, but it seems to me that there is a very deep error in even trying to solve 'problems' like this. It is not logically possible to permit any syntax and still parse a statement. All meaningful grammars exist--can only exist--because they impose limitations on language. It is monstrous that a file name is permitted to end with a quotation mark! Without reserved characters we invite chaos. It's the same with spaces inside a filename--it is insanity to permit it. And then the double quote is legal too?

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.




Messages sorted by: Reverse Date, Date, Thread, Author