From: John (I've got some bad news for you, sunshine) Mackin <john@vetsci.su.oz.au>
To: The rc Mailing List <rc@archone.tamu.edu>
Subject: Re: comments, newlines
Date: Fri, 13 Mar 1992 04:14:22 -0600 [thread overview]
Message-ID: <199203132014.5018.rc.bagel@vetsci.su.oz.au> (raw)
In-Reply-To: <5714.700437948@golem>
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.
next prev parent reply other threads:[~1992-03-13 10:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-03-11 17:27 haahr
1992-03-12 22:05 ` David J. Fiander
1992-03-13 10:14 ` John Mackin [this message]
1992-03-13 22:44 ` Dave Mason
-- strict thread matches above, loose matches on Subject: below --
1992-03-14 19:39 Emin G. Sirer
1992-03-15 23:31 ` James Matthew Farrow
1992-03-15 17:54 ` schwartz
1992-03-11 7:19 schwartz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199203132014.5018.rc.bagel@vetsci.su.oz.au \
--to=john@vetsci.su.oz.au \
--cc=rc@archone.tamu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).