From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28438 invoked from network); 25 Aug 2000 15:58:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Aug 2000 15:58:51 -0000 Received: (qmail 29784 invoked by alias); 25 Aug 2000 15:58:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12699 Received: (qmail 29777 invoked from network); 25 Aug 2000 15:58:15 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Adam Spiers" , "Zsh hackers list" Subject: RE: comments break \ at end of line Date: Fri, 25 Aug 2000 19:58:09 +0400 Message-ID: <000001c00ead$44065290$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-To: <20000825153830.C22595@thelonious.new.ox.ac.uk> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal > I'm suggesting that, in the case of the function, it turns it into > `echo hello, world', and in second case, it expects another line of > input, just as if you hadn't entered the comment line. After all, > comment lines are supposed to be ignored, aren't they? That is exactly what happens currently - everything from `#' up to the next EOL is ignored. This seems far > more sensible behaviour to me: a) it's useful to be able to > intersperse comments with continuation lines, No, I am against it. It will turn into a nightmare. echo foo \ # # ... 57 lines of comments # echo bar How do you like it? and b) if you didn't > want the continuation happening, you wouldn't have included the > backslashes in the first place. > It is not a continuation. It is simply removing of EOL no more no less (and so it is documented). Yes, for all practical purposes it is the same as continuation ... > > I don't see how you can turn it > > off without writing a completely new (= bugridden) way of lexing. > > As is probably already obvious, I'm fairly ignorant of zsh's lexing > and parsing. At what stage do comments get dropped? I would have > thought that if they were dropped earlier on that this would achieve > what I want, but I'm just guessing. > But I just realised. In case of echo foo \ # comment bar how do you want to indicate, that `bar' is not a comment? I mean echo foo \ #comment \ bar is the same as echo foo #comment bar that makes bar be happily ignored. The above change is trivial, but gains you nothing. Anything else, I agree, is too error prone. -andrej