From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from doolittle.vetsci.su.OZ.AU ([129.78.148.2]) by archone.tamu.edu with SMTP id <45334>; Fri, 13 Mar 1992 04:24:45 -0600 Received: by doolittle.vetsci.su.oz.au id <49223>; Fri, 13 Mar 1992 20:24:10 +1000 From: John (I've got some bad news for you, sunshine) Mackin Date: Fri, 13 Mar 1992 04:14:22 -0600 To: The rc Mailing List Subject: Re: comments, newlines In-Reply-To: <5714.700437948@golem> Message-ID: <199203132014.5018.rc.bagel@vetsci.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ I agree with Paul. The rule doesn't need to be changed. In fact, I think it definitely should NOT be, since I think it makes scripts significantly harder to read if comments are inserted inside continued commands. But: The way in which the rule is interpreted doesn't matter. If \+nl is interpreted even in comments, then the shell will see x=(1 # 2 3) This doesn't make sense. The rule is, ignore everything between # and newline, INCLUDING THE #. I mean, if you go echo foo # bar you get "foo", not "foo #". So if backslash were to be interpreted at the end of a comment, that wouldn't happen, and it would all work. And now for my real reason for sending this: there is one thing about # that I have never liked. I have complained privately about this (long ago), but Byron didn't agree with me: so let's see if we can get some public support for _this_ idea. I claim that # should only be seen as a comment introducer if it is preceded by whitespace or at the start of the line. So if you do echo foo#bar you should, in my view, get "foo#bar". You do in sh. You don't in rc: Byron thinks # should introduce a comment even if it is in the middle of a word. I think this is plainly wrong. Opinions? OK, John.