Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: showing 'talk' status in PROMPT
- X-seq: zsh-users 1105
- From: Timothy J Luoma <luomat+zsh+users@xxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxx>
- Subject: Re: showing 'talk' status in PROMPT
- Date: Mon, 27 Oct 97 12:18:54 -0500
- Cc: zsh-users@xxxxxxxxxxxxxxx (Zsh users list)
- In-reply-to: <199710270852.JAA07593@xxxxxxxxxxxx>
- References: <199710270852.JAA07593@xxxxxxxxxxxx>
Author: Peter Stephenson <pws@xxxxxx>
Original-Date: Mon, 27 Oct 1997 09:52:33 +0100
Message-ID: <199710270852.JAA07593@xxxxxxxxxxxx>
> I haven't tried this out, but you have problems if you just run mesg
> with no arguments and it was already turned off. You should test
> for '') and if so just run /usr/bin/mesg without setting $TALK.
Ah yes! Believe it or not I had ``tested'' whether 'mesg' by itself would
work, but I had only tested it when I had messages ON! So I never noticed
this.
Thanks for the pointer. The new function is as follows:
mesg () {
case $1 in
n*|off)
TALK="<notalk> "
/usr/bin/mesg n
;;
'')
/usr/bin/mesg
;;
*)
TALK=""
/usr/bin/mesg $*
;;
esac
}
TjL
Messages sorted by:
Reverse Date,
Date,
Thread,
Author