rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: hugh@mimosa.com ("D. Hugh Redelmeier")
To: rc@hawkwind.utcs.toronto.edu
Subject: -s flag
Date: Tue, 30 Jun 1992 02:55:40 -0400	[thread overview]
Message-ID: <9206300655.AA09921@redvax.mimosa.com> (raw)

| From: John (_You_ hide, they seek.) Mackin <john@vetsci.su.oz.au>
|
|  Hey, can anyone on the list tell us
| all if they have any reason at all for wanting -s?  Inquiring minds
| want to know.
|
| ... I will always be willing to entertain rc features
| that keep it compatible (in appropriate ways) with traditional shells.

| From: Bob Gibson <rjg@sco.com>
|
| My editor, jove, starts up subshells with the -s option, and obviously
| fails to do so if the shell doesn't support it.  In this case, the
| correct thing to do would be to fix jove to make this configurable.

I am the person who made JOVE invoke subshells with the -s flag.  I
did it in about 1984, so I have forgotten some of the subtle
details.  I will try to reconstruct them.

First, a hint from SunOS 4.0.3 sh(1):

     -s             If the -s option is present or  if  no  argu-
                    ments remain commands are read from the stan-
                    dard input.  Any remaining arguments  specify
                    the   positional  parameters.   Shell  output
                    (except for Special Commands) is  written  to
                    file descriptor 2.

Actually, the story goes back to about about 1976, when I was
hacking on ed(1).  I changed the ! command so that the shell command
was invoked in such a way that the current file could be referred to
as $1.  This was extremely convenient.
	!cp -p $1 $1.BAK
	!chmod u+w $1
	!pr $1 | lpr
	!diff $1.BAK $1

When I started hacking on JOVE, I naturally wanted this feature
too.  The only way that I could get it to work with csh and and all
versions of sh was to throw in the -s.  [I don't remember which
failed without the -s]

I want to keep using this feature.  I don't want to hack JOVE to
allow the suppression of the -s for rc.  I think it is better to
hack rc to accept -s like other UNIX shells.

Hugh Redelmeier
hugh@mimosa.com or {utcsri, uunet!attcan, utzoo, scocan}!redvax!hugh
When all else fails: hugh@csri.toronto.edu
+1 416 482-8253


             reply	other threads:[~1992-06-30  8:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-06-30  6:55 "D. Hugh Redelmeier" [this message]
1992-06-30  8:26 ` Matthew Farwell
1992-06-30 15:03 "D. Hugh Redelmeier"
1992-06-30 15:29 haahr
1992-07-01 12:52 ` Gerry.Tomlinson
1992-07-01 21:14   ` Chris Siebenmann
1992-07-01 21:30 "D. Hugh Redelmeier"
1992-07-02 12:52 ` Gerry.Tomlinson
1992-07-02 14:03 Chet Ramey

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=9206300655.AA09921@redvax.mimosa.com \
    --to=hugh@mimosa.com \
    --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).