rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Scott Schwartz <schwartz@groucho.cs.psu.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: prompt function
Date: Tue, 9 Jun 1992 15:34:45 -0400	[thread overview]
Message-ID: <92Jun9.153459edt.2538@groucho.cs.psu.edu> (raw)


My prompt function looks like this:

fn prompt {
  s=$status {switch($s){case [^'~'^0]*;echo '# status' $s;return $s}}
}

Previously, I didn't return the old status, which was wrong because it
gratuitously destroyed information, just what $status is there to
avoid.  On the other hand, now each time I hit return after a command
that exits with nonzero status, I get a reminder, which is overly
noisy.  This makes me suspect that 'fn prompt' is not the proper answer
to 'set notify'.  (And speaking of that, I think it would be sensible
for rc to keep track of the statuses of background jobs in $astatus.)
(I should also echo to stderr, too, don't you think?)


                 reply	other threads:[~1992-06-09 19:35 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=92Jun9.153459edt.2538@groucho.cs.psu.edu \
    --to=schwartz@groucho.cs.psu.edu \
    --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).