From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6567 invoked from network); 16 Sep 2006 19:02:49 -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 19:02:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 16455 invoked from network); 16 Sep 2006 19:02:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 19:02:41 -0000 Received: (qmail 23559 invoked by alias); 16 Sep 2006 19:02:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10726 Received: (qmail 23549 invoked from network); 16 Sep 2006 19:02:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Sep 2006 19:02:31 -0000 Received: (qmail 15314 invoked from network); 16 Sep 2006 19:02:31 -0000 Received: from ms-1.rz.rwth-aachen.de (HELO ms-dienst.rz.rwth-aachen.de) (134.130.3.130) by a.mx.sunsite.dk with SMTP; 16 Sep 2006 19:02:30 -0000 Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by ms-dienst.rz.rwth-aachen.de (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0J5P00JS58W4XF@ms-dienst.rz.rwth-aachen.de> for zsh-users@sunsite.dk; Sat, 16 Sep 2006 21:02:29 +0200 (MEST) Received: from relay.rwth-aachen.de ([134.130.3.1]) by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Sat, 16 Sep 2006 21:02:28 +0200 (MEST) Received: from fsst.voodoo.lan (i577BCEF8.versanet.de [87.123.206.248]) by relay.rwth-aachen.de (8.13.7/8.13.3/1) with ESMTP id k8GJ2Re3000900 for ; Sat, 16 Sep 2006 21:02:28 +0200 (MEST) Received: from hawk by fsst.voodoo.lan with local (Exim 4.63) (envelope-from ) id 1GOfQJ-0000VA-0J for zsh-users@sunsite.dk; Sat, 16 Sep 2006 21:01:55 +0200 Date: Sat, 16 Sep 2006 21:01:55 +0200 From: Frank Terbeck Subject: Re: get output of a command in prompt In-reply-to: <20060916184913.GA18417@localhost.localdomain> To: zsh-users@sunsite.dk Mail-followup-to: zsh-users@sunsite.dk Message-id: <20060916190154.GA24023@fsst.voodoo.lan> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline Operating-System: Linux 2.6.16.16 i686 User-Agent: Mutt/1.5.13 (2006-08-11) References: <20060916184913.GA18417@localhost.localdomain> arno. : [..get output of command into prompt..] Take a look at this: [snip] zsh% PS1='$(printf "%s: %d" "This is a one" 1)-%% ' $(printf ": /home/hawk" "This is a one" 1)-% setopt promptsubst This is a one: 1-% [snap] Regards, Frank