From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8392 invoked from network); 3 Jul 2005 23:05:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Jul 2005 23:05:30 -0000 Received: (qmail 90600 invoked from network); 3 Jul 2005 23:05:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Jul 2005 23:05:23 -0000 Received: (qmail 19112 invoked by alias); 3 Jul 2005 23:05:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9014 Received: (qmail 19102 invoked from network); 3 Jul 2005 23:05:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Jul 2005 23:05:15 -0000 Received: (qmail 89609 invoked from network); 3 Jul 2005 23:05:15 -0000 Received: from viefep12-int.chello.at (HELO viefep20-int.chello.at) (213.46.255.25) by a.mx.sunsite.dk with SMTP; 3 Jul 2005 23:05:11 -0000 Received: from Dingo ([213.47.104.218]) by viefep20-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050703230510.ZZAM29474.viefep20-int.chello.at@Dingo> for ; Mon, 4 Jul 2005 01:05:10 +0200 From: Christian Taylor To: zsh-users Subject: Re: reinventing print_exit_value Date: Mon, 4 Jul 2005 01:04:41 +0200 User-Agent: KMail/1.8 References: <200507032356.17308.cht@chello.at> <20050703223209.GA5083@puritan.pnetwork> In-Reply-To: <20050703223209.GA5083@puritan.pnetwork> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200507040104.41345.cht@chello.at> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Nikolai Weibull wrote: > Christian Taylor wrote: > > I recently decided that I want the exit code of the last command (if it's > > greater than 0) displayed after invoking it, like the PRINT_EXIT_VALUE > > option does, but in my own format. (I don't want to include it in my > > prompt.) > > Actually, you _do_ want to include it in your prompt. Simply use > > %(?..status: %?) > > in your prompt, and it will only be displayed when there's something to > display (non-zero exit value in this case), I know, I tried it both in the left and the right prompt, but for some reason I just didn't like it. A PRINT_EXIT_VALUE-style output on an extra line suits me more. This is really just cosmetics, but hey - everything else just works, where's the fun in that? :) Christian