Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
showing 'talk' status in PROMPT
- X-seq: zsh-users 1100
- From: Timothy J Luoma <luomat+zsh+users@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: showing 'talk' status in PROMPT
- Date: Sun, 26 Oct 97 23:43:35 -0500
I am using this to let me know if I have turned off messages on my terminal:
mesg () {
case $1 in
n*|off)
TALK="<notalk> "
/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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author