From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7499 invoked from network); 27 Oct 1997 04:51:26 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 27 Oct 1997 04:51:26 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id XAA09966; Sun, 26 Oct 1997 23:43:26 -0500 (EST) Resent-Date: Sun, 26 Oct 1997 23:42:41 -0500 (EST) Message-Id: <199710270443.XAA17820@luomat.peak.org> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 4.2mach v148) X-Nextstep-Mailer: Mail 4.2mach (Enhance 2.0b6.3) From: Timothy J Luoma Date: Sun, 26 Oct 97 23:43:35 -0500 To: zsh-users@math.gatech.edu Subject: showing 'talk' status in PROMPT Resent-Message-ID: <"oJ6FL2.0.gQ2.0l1Lq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1100 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I am using this to let me know if I have turned off messages on my terminal: mesg () { case $1 in n*|off) TALK=" " /usr/bin/mesg n ;; *) /usr/bin/mesg $* TALK="" ;; esac } # note: the next line is all one line until the %b # then another line break after the %s PROMPT='%SUSER: %B(%n)%b HOST: %B(%M)%b TTY: %B(tty%l)%b HIST#: %B(%h)%b [OLDPWD: %B$OLDPWD%b] [PWD: %B%~%b]%s $TALK' Does anyone see any problems with this, or have a better way to do this? Thanks TjL