From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4546 invoked from network); 27 Oct 1997 17:34:32 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 27 Oct 1997 17:34:32 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA22178; Mon, 27 Oct 1997 12:21:20 -0500 (EST) Resent-Date: Mon, 27 Oct 1997 12:20:40 -0500 (EST) From: "Bart Schaefer" Message-Id: <971027092138.ZM3590@candle.brasslantern.com> Date: Mon, 27 Oct 1997 09:21:38 -0800 In-Reply-To: <199710270852.JAA07593@hydra.ifh.de> Comments: In reply to Peter Stephenson "Re: showing 'talk' status in PROMPT" (Oct 27, 9:52am) References: <199710270852.JAA07593@hydra.ifh.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-users@math.gatech.edu (Zsh users list) Subject: Re: showing 'talk' status in PROMPT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"JMnMD3.0.JP5.drCLq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1106 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu } Subject: 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: Peter Stephenson wrote: } } 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. How about this: mesg () { command mesg $* setopt localoptions nullglob local tty tty=( ${~TTY:s/dev/de[v]/}(I) ) case $tty in $TTY) TALK= ;; '') TALK=" " ;; esac } Question: Is there any easier way to get the (I) glob qualifier applied to the value of $TTY ? I had to invent that de[v] trick just to force there to be a pattern somewhere in the string. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com