From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7889 invoked by alias); 9 Dec 2010 15:42:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28506 Received: (qmail 14867 invoked from network); 9 Dec 2010 15:42:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <101209074233.ZM8003@torch.brasslantern.com> Date: Thu, 09 Dec 2010 07:42:33 -0800 In-reply-to: <20101208175103.40d6cc29@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Another ${(z)param} buglet" (Dec 8, 5:51pm) References: <101207203441.ZM4340@torch.brasslantern.com> <20101208175103.40d6cc29@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Another ${(z)param} buglet MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 8, 5:51pm, Peter Stephenson wrote: } Subject: Re: Another ${(z)param} buglet } } On Tue, 07 Dec 2010 20:34:36 -0800 } Bart Schaefer wrote: } > It doesn't understand about comments, and becomes confused by a } > comment that contains an unbalance quote character. } } I think you can fix this something like the following, although it's not } particularly elegant. Could make it strip comments instead of reporting } them, otherwise you need to remove fields starting with a # by hand (if } it's an unquoted #, it must be a comment). Thanks for putting in this effort, but on reflection I think it's important to be able to specify whether comments are handled or not. There isn't yet a (Z) flag; perhaps we could make that the equivalent of turning on interactivecomments, and leave (z) as it was? I'm undecided on stripping comments vs. leaving them as "tokens" for manual removal, but I lean to leaving them, as it's possible to remove them once they've been parsed but it's practically impossible to put them back once they're gone. } I was... confident is not the right word... blatant enough to attempt } to add some documentation to some of this. Maybe this gives someone [*] enough to go on to be able to fix that here-document problem I encountered. [*] It won't be me, at least not until after the next 2 weeks are over.