From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7449 invoked from network); 26 Jul 2005 14:01:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2005 14:01:47 -0000 Received: (qmail 67274 invoked from network); 26 Jul 2005 14:01:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 14:01:41 -0000 Received: (qmail 29141 invoked by alias); 26 Jul 2005 14:01:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9186 Received: (qmail 29131 invoked from network); 26 Jul 2005 14:01:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Jul 2005 14:01:30 -0000 Received: (qmail 66150 invoked from network); 26 Jul 2005 14:01:30 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 26 Jul 2005 14:01:24 -0000 Received: from candle.brasslantern.com ([71.116.88.149]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IK8008CMMXZE3G3@vms046.mailsrvcs.net> for zsh-users@sunsite.dk; Tue, 26 Jul 2005 09:01:12 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j6QE1ASQ029373 for ; Tue, 26 Jul 2005 07:01:10 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j6QE1A98029372 for zsh-users@sunsite.dk; Tue, 26 Jul 2005 07:01:10 -0700 Date: Tue, 26 Jul 2005 14:01:09 +0000 From: Bart Schaefer Subject: Re: psvar expansion with %v In-reply-to: <20050726073322.GA1945@DervishD> To: Zsh Users Message-id: <1050726140109.ZM29371@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050723084210.GA7913@DervishD> <20050726073322.GA1945@DervishD> Comments: In reply to DervishD "Re: psvar expansion with %v" (Jul 26, 9:33am) 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.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Jul 26, 9:33am, DervishD wrote: } } > How can I use psvar and %v to get a readable PS1 *but* use escape } > sequences at the same time? I'm using zsh 4.2.5 (i686-pc-linux-gnu) } } I still haven't solved this, and I've carried a lot of tests. Is } any way of using '%{%}' constructs, or escape sequences, using psvar? No, there isn't. The results of percent-expandos are not re-expanded, so whatever gets inserted by %v appears literally in the final prompt. Furthermore, anything inserted by any percent-expando (be it your user name, or the host name, or the contents of psvar) is deliberately put through a conversion to printable form so that you can't accidentally mess up ZLE by moving the cursor or emitting something whose displayed length cannot be accurately counted. Consider the bad things that could otherwise result if you created a directory with strange characters in its name when your prompt has %/ in it, or had such a directory in your path when using %N.