From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13766 invoked by alias); 24 Dec 2013 16:25:17 -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: 18250 Received: (qmail 13678 invoked from network); 24 Dec 2013 16:25:11 -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=-0.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_NUMERIC_HELO,SPF_HELO_PASS autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: Yuri D'Elia Subject: Re: Expanding quotes Date: Tue, 24 Dec 2013 17:24:52 +0100 Message-ID: References: <131217102648.ZM8656@torch.brasslantern.com> <131223111515.ZM31989@torch.brasslantern.com> <52B9A47B.7050009@eastlink.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 159.20.235.175 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 In-Reply-To: <52B9A47B.7050009@eastlink.ca> 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.