From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10725 invoked from network); 14 Jul 2003 17:57:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Jul 2003 17:57:38 -0000 Received: (qmail 15307 invoked by alias); 14 Jul 2003 17:57:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6397 Received: (qmail 15292 invoked from network); 14 Jul 2003 17:57:27 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Jul 2003 17:57:27 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.87.0.242] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Jul 2003 17:57:27 -0000 Received: from mike by Amber.lab.icm.edu.pl with local (Exim 3.36 #1 (Debian)) id 19c7Zn-00052i-00 for ; Mon, 14 Jul 2003 19:57:27 +0200 Date: Mon, 14 Jul 2003 19:57:27 +0200 From: =?iso-8859-2?Q?Micha=B3?= Politowski To: zsh-users@sunsite.dk Subject: Re: $? being clobbered? Message-ID: <20030714175727.GA19238@Amber.lab.icm.edu.pl> Mail-Followup-To: zsh-users@sunsite.dk References: <20030714173555.GA4352@mithrandir.aperiodic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20030714173555.GA4352@mithrandir.aperiodic.net> X-PGP: 1024D/8C6E2929; AC30 1FC4 4C4B 8834 38D8 21DA 7EB7 7AAB 8C6E 2929; 2002-03-02 -- 2004-03-01 User-Agent: Mutt/1.5.4i On Mon, 14 Jul 2003 13:35:56 -0400, Phil!Gregory wrote: > I'm having a problem with zsh, and am not sure if it's a bug or a > feature. If I have a program executed in my prompt, its return status > clobbers the value of $?, which isn't really what I want. Example: >=20 > > PROMPT=3D'> ' > > perl -e 'exit 42' > > echo $? > 42 > > PROMPT=3D'%{$(echoti cub 80)%}> ' > > perl -e 'exit 42' > > echo $? > 0 >=20 > Is there some way to fix this? You can hack around this with $(R=3D$?;echoti cub 80;return $R) --=20 Micha=B3 Politowski -- mpol@charybda.icm.edu.pl Warning: this is a memetically modified message