From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5674 invoked from network); 29 Jun 2002 11:34:47 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 29 Jun 2002 11:34:47 -0000 Received: (qmail 4422 invoked by alias); 29 Jun 2002 11:34:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17378 Received: (qmail 4410 invoked from network); 29 Jun 2002 11:34:41 -0000 Date: Sat, 29 Jun 2002 12:34:40 +0100 From: Adam Spiers To: zsh workers mailing list Subject: broken pipe with prompt -h Message-ID: <20020629123440.A28494@corelli.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-URL: http://tigerpig.org/ X-OS: RedHat Linux Sender: "Adam Spiers,,07775562717,020 88 30 30 35" In attempts to counter my previous foolishness for initially making '8bit' the default display mode for my adam2 prompt, and then swapping it around so that 'plain' is the default, I've found myself wanting to check from within my .zshrc which version of adam2 is available in the installed zsh: $ prompt -h adam2 | grep -q 8bit However, due to some signal-trapping related funniness, if grep finds a match early enough, set_prompt gets a SIGPIPE: $ prompt -h adam2 | grep -q plain set_prompt:52: write error: broken pipe set_prompt:53: write error: broken pipe I tried to fix this with a trap '' PIPE just after the 'setopt localtraps' in set_prompt and in various other places, but it only occasionally works, which is very curious. Can anyone please tell me the correct fix?