* prompt function
@ 1992-06-09 19:34 Scott Schwartz
0 siblings, 0 replies; only message in thread
From: Scott Schwartz @ 1992-06-09 19:34 UTC (permalink / raw)
To: rc
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?)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-06-09 19:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-06-09 19:34 prompt function Scott Schwartz
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).