rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John (Most modern computers would break if you stood on them) Mackin <john@ civil.su.oz.au>
To: The rc Mailing List <rc@hawkwind.utcs.toronto.edu>
Subject: A truly revolting feature
Date: Fri, 9 Jul 1993 00:54:51 -0400	[thread overview]
Message-ID: <199307091454.931.rc.bakis@civil.su.oz.au> (raw)

I won't name the person whose idea this was since it isn't really his
fault, and my intent isn't to hold _him_ up to ridicule.  Rather it is
to shed light into one of the darkest crannies I have yet seen in the
lexical analyser in /bin/sh, so that we can all feel extra-glad that
we've seen the light and changed to better shells.

Many months ago, I told this man about rc and suggested that he should
take a look at it.  I showed him Duff's document.  He went as far as
building it and putting it in his machine's /usr/local/bin, and giving
it a try.  For some reason, he hasn't changed to rc, but he sent me mail
at the time saying that he was impressed by the ability to mouse the
whole line with the "; " prompt.  I pointed out to him that he could
do that under sh also by using the Pike prompt style (":<anything> ;"),
and then never heard any more from him about it.

The other day I was in his office and he proudly showed me what he'd
come up with: the ability to mouse the whole line _even though PS1
had the standard value of "$ "_.  He had put the following in
$home/bin/ ^ '$':

#!/bin/sh
exec "$@"

Much to my nausea, it turns out that sh is quite prepared to regard
a bare $ sign as a plain old "word", and search the path for it if
it stands in command position...  Of course, this has to be a script
and not a function, since sh's function names have to be "identifer"s.
But, how horrendous can you get?

Yeuch.

OK,
John.


                 reply	other threads:[~1993-07-09  6:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=199307091454.931.rc.bakis@civil.su.oz.au \
    --to=john@civil.su.oz.au \
    --cc=rc@hawkwind.utcs.toronto.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).