From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11635 invoked from network); 16 Sep 2006 18:49:36 -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; 16 Sep 2006 18:49:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4719 invoked from network); 16 Sep 2006 18:49:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 18:49:23 -0000 Received: (qmail 22539 invoked by alias); 16 Sep 2006 18:49:16 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10725 Received: (qmail 22529 invoked from network); 16 Sep 2006 18:49:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Sep 2006 18:49:15 -0000 Received: (qmail 3627 invoked from network); 16 Sep 2006 18:49:15 -0000 Received: from smtp5-g19.free.fr (212.27.42.35) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 18:49:14 -0000 Received: from localhost (evr91-1-82-227-12-160.fbx.proxad.net [82.227.12.160]) by smtp5-g19.free.fr (Postfix) with ESMTP id EEAEA256C1 for ; Sat, 16 Sep 2006 20:49:13 +0200 (CEST) Date: Sat, 16 Sep 2006 20:49:13 +0200 From: "arno." To: zsh-users@sunsite.dk Subject: get output of a command in prompt Message-ID: <20060916184913.GA18417@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I want to get the output of a command in my prompt=20 (actually, I want the temperature of my cpu in RPS1 if it is superior=20 to a some predifined value). So I have something like : RPS1=3D"%2v" and=20 precmd() { gettemp } with gettemp that gets temperature and puts it in psvar[2] if needed. Today, I've seen in zsh user guide : > Some people make the mistake of using it [precmd function] to set up a=20 > prompt, but there are enough ways of getting varying information into a= =20 > fixed prompt string that you shouldn't do that unless you have very odd= =20 > things in your prompt. http://zsh.sunsite.dk/Guide/zshguide03.html#l51 But I didn't find a better way to do what I want. Did I miss something,=20 or is my goal something "very odd". thanks=20 arno --BOKacYhQ+x31HxR3 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) iD8DBQFFDEcpiH9aBScBsrMRAuwHAJ4/XCUUr+etS8ly81DoVZVXxrofTACdFng6 bfYpdY+GpAvNS3Mp6DxkwZs= =xj7M -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--