From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from groucho.cs.psu.edu ([130.203.2.10]) by hawkwind.utcs.toronto.edu with SMTP id <2721>; Tue, 9 Jun 1992 15:35:36 -0400 Received: by groucho.cs.psu.edu id <2538>; Tue, 9 Jun 1992 15:34:59 -0400 From: Scott Schwartz To: rc@hawkwind.utcs.toronto.edu Subject: prompt function Message-Id: <92Jun9.153459edt.2538@groucho.cs.psu.edu> Date: Tue, 9 Jun 1992 15:34:45 -0400 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?)