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

showing 'talk' status in PROMPT



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