From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24293 invoked from network); 26 Aug 2005 09:36:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Aug 2005 09:36:58 -0000 Received: (qmail 4724 invoked from network); 26 Aug 2005 09:36:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Aug 2005 09:36:51 -0000 Received: (qmail 11580 invoked by alias); 26 Aug 2005 09:36:43 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9344 Received: (qmail 11570 invoked from network); 26 Aug 2005 09:36:42 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Aug 2005 09:36:42 -0000 Received: (qmail 3697 invoked from network); 26 Aug 2005 09:36:42 -0000 Received: from sol.nlnetlabs.nl (213.154.224.43) by a.mx.sunsite.dk with SMTP; 26 Aug 2005 09:36:38 -0000 Received: from elektron.atoom.net (a80-127-17-126.adsl.xs4all.nl [80.127.17.126]) by sol.nlnetlabs.nl (Postfix) with ESMTP id 3E9DF188069 for ; Fri, 26 Aug 2005 11:36:47 +0200 (CEST) Received: by elektron.atoom.net (Postfix, from userid 1000) id 916F9281BE8D; Fri, 26 Aug 2005 11:36:37 +0200 (CEST) Date: Fri, 26 Aug 2005 11:36:37 +0200 From: Miek Gieben To: zsh users Subject: previous cmd in RPS1 Message-ID: <20050826093637.GA15060@atoom.net> Mail-Followup-To: zsh users Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline User-Agent: Vim/Mutt/Linux X-Home: www.miek.nl X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.4 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hello all, I have my prompt setup in such a way that it will print my previous cmd in green (when the exitcode was 0) or red (exitcode !=3D 0) on the right side of my screen. This works really well, expect in some cases. It seems that sometimes this setup fails, for instance when my previous cmd had a % in it, this gets re-evaluated and results in a weird looking prompt. Also when I try to type in a for-loop and I=20 make a typo which causes the loop to hang, my prompt also hangs. It there any way to make zsh /not/ to parse my previous cmd but just show it as is? Below are the relevant piecies of my prompt setup: RPSL=3D$'%{\e[0m%}%{\e[$C;31m%}%(0?.%{\e[$C;32m%}.(%?%)) ' RPSR=3D$'%{\e[0m%}' ((MAXMID=3D$COLUMNS / 2)) # truncate to this value RPSMID=3D$history[$[${(%):-%h}-1]] RPS1=3D"$RPSL%$MAXMID<... <$RPSMID$RPSR" Thanks for any help, -- grtz, - Miek http://www.miek.nl http://www.nlnetlabs.nl PGP Key ID: 0xB18453A1 fingerprint: 002B B079 0DDA 7D44 2B5C CAB0 C3B7 F943 B184 53A1 --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFDDuKlw7f5Q7GEU6ERAt1GAKC8C/PPPmEM+6U7RLB1+k7tkpS+mACeIjri g+du6i0uNDGRE8yklhCNF7Q= =QjW+ -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--