From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16593 invoked from network); 17 Sep 2006 14:14:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Sep 2006 14:14:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 71817 invoked from network); 17 Sep 2006 14:14:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Sep 2006 14:14:37 -0000 Received: (qmail 7961 invoked by alias); 17 Sep 2006 14:14:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10727 Received: (qmail 7951 invoked from network); 17 Sep 2006 14:14:25 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Sep 2006 14:14:25 -0000 Received: (qmail 70489 invoked from network); 17 Sep 2006 14:14:25 -0000 Received: from smtp1-g19.free.fr (212.27.42.27) by a.mx.sunsite.dk with SMTP; 17 Sep 2006 14:14:24 -0000 Received: from localhost (evr91-1-82-227-12-160.fbx.proxad.net [82.227.12.160]) by smtp1-g19.free.fr (Postfix) with ESMTP id 17308689B9 for ; Sun, 17 Sep 2006 16:14:23 +0200 (CEST) Date: Sun, 17 Sep 2006 16:14:20 +0200 From: "arno." To: zsh-users@sunsite.dk Subject: Re: get output of a command in prompt Message-ID: <20060917141420.GA5288@localhost.localdomain> References: <20060916184913.GA18417@localhost.localdomain> <20060916190154.GA24023@fsst.voodoo.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <20060916190154.GA24023@fsst.voodoo.lan> User-Agent: Mutt/1.5.13 (2006-08-11) --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Le Saturday 16 September 2006, =E0 21:01:55PM +0200, Frank a =E9crit :=20 > arno. : > [..get output of command into prompt..] >=20 > Take a look at this: >=20 > [snip] > zsh% PS1=3D'$(printf "%s: %d" "This is a one" 1)-%% ' > $(printf ": /home/hawk" "This is a one" 1)-% setopt promptsubst=20 > This is a one: 1-% > [snap] Yes, I've tried things like that, but the problem is that command output=20 will be evaluated once, just when prompt is set up. It will not be=20 evaluated each time prompt is displayed arno --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFDVg8iH9aBScBsrMRAktMAJ9QbdeVmKRY1BD0mHe03G5ADJ0odgCfY7Q6 hlqigSQkuC7alY5vIP8QL8I= =0Tz2 -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--