Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: showing 'talk' status in PROMPT



Timothy J Luoma wrote:

> 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=""

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.

> 
>                 ;;
>         esac
> }

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, Platanenallee 6, 15738 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author