rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: dws@cs.wisc.edu (DaviD W. Sanderson)
To: rc@archone.tamu.edu
Subject: Re: early reaction(s) to rc
Date: Fri, 23 Aug 1991 11:51:08 -0500	[thread overview]
Message-ID: <9108231651.AA27879@margay.cs.wisc.edu> (raw)

> the matter at any length.  (On a point of pure gustation, I do have to
> say I don't like the name much -- but on the other hand I can't think of
> a better one right now either: the obvious sigbegin doesn't appeal,
> and sigenter (as the antonym of sigexit) doesn't sound right either.
> Suggestions, any rcer's?)

How about "sigmain", analogous to the entry function for C programs
(and nicely parallel to "sigexit".) Unfortunately not all the special
functions in rc have names beginning with "sig", though they would if
"prompt" were changed to "sigprompt".  This would allow a useful
convention: ``all special functions in rc have names beginning with
"sig"''.

> As a quite separate issue I'd like to address the question of telling
> whether or not the shell is interactive.  sh has $-, and $- has many

I have suggested to Byron making the rc flags available in a special
variable.  I think the Plan 9 rc does this, but I don't have my docs
handy to check.

> that rc has no "set" builtin (or equivalent mechanism).  Byron, in
> the eventual revamp of rc -x, you might like to consider that it
> is not at all unreasonable to want to turn -x off and on at different
> points during execution.

Yes, I think it would be useful to be able to toggle certain
command-line switches.  Often I am interested in debugging only part of
a script, and being able to selectively turn on -x has helped in sh.
I dunno what a reasonable syntax might be.

> This is what I fail to follow; I don't understand why one needs to tell
> whether or not the shell is interactive in order to accomplish the goal
> of making a root prompt be something arbitrary.

There is another possible application:  I might want to remove
something from the environment if the shell is NOT interactive.
This could be a way (albeit a bit clumsy) to get around the fact
that all variables are exported into the environment.

DaviD W. Sanderson (dws@cs.wisc.edu)


             reply	other threads:[~1991-08-23 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-23 16:51 DaviD W. Sanderson [this message]
1991-08-23 17:07 ` Boyd Roberts
  -- strict thread matches above, loose matches on Subject: below --
1991-08-27  6:24 Paul Haahr
1991-08-27  7:15 ` Chris Siebenmann
1991-08-27 10:22 ` Boyd Roberts
1991-08-23 20:47 Arnold D. Robbins
1991-08-24  0:15 ` John Mackin
1991-08-24  3:48   ` John Mackin
1991-08-23 16:24 Arnold D. Robbins
1991-08-27  2:33 ` Chris Siebenmann
1991-08-23  1:36 new list subscriber Byron Rakitzis
1991-08-23 13:40 ` early reaction(s) to rc John Mackin
1991-08-27  2:28   ` Chris Siebenmann

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=9108231651.AA27879@margay.cs.wisc.edu \
    --to=dws@cs.wisc.edu \
    --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).