From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29972 invoked from network); 7 Sep 2005 08:01:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Sep 2005 08:01:34 -0000 Received: (qmail 87037 invoked from network); 7 Sep 2005 08:01:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Sep 2005 08:01:25 -0000 Received: (qmail 19715 invoked by alias); 7 Sep 2005 08:01:18 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9397 Received: (qmail 19705 invoked from network); 7 Sep 2005 08:01:17 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Sep 2005 08:01:17 -0000 Received: (qmail 86059 invoked from network); 7 Sep 2005 08:01:17 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 7 Sep 2005 08:01:13 -0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1ECur0-0001gi-DX for zsh-users@sunsite.dk; Wed, 07 Sep 2005 10:00:22 +0200 Received: from dsl-082-082-120-005.arcor-ip.net ([82.82.120.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Sep 2005 10:00:22 +0200 Received: from irrlicht2c by dsl-082-082-120-005.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 07 Sep 2005 10:00:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Tim Kruse Subject: Re: Colored PS1 Date: Wed, 7 Sep 2005 09:53:01 +0200 Organization: private Message-ID: References: <20050907.052542.74749449.Meino.Cramer@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Signature_Wed__7_Sep_2005_09_53_01_+0200_ObNQST+MZchmjrUk; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dsl-082-082-120-005.arcor-ip.net X-Newsreader: Sylpheed-Claws 1.9.14 (GTK+ 2.6.10; i686-pc-linux-gnu) X-GPG-Key-ID: 390E8EEC X-GPG-Fingerprint: 526F 2867 A8F2 DB46 44D2 0519 D67A A195 390E 8EEC X-Face: yuSM.z0$PasG_!+)P;ugu5P+@#JEocHIpArGcQZ^hcGos8:DBJ-tfTQYWyf`$2r0vfaoo7F|h.;Agl'@x8v]?{#ZLQDqSB:L^6RXGfF_fD+G9$c:)p 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 --Signature_Wed__7_Sep_2005_09_53_01_+0200_ObNQST+MZchmjrUk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable * On 07.09.2005 Meino Christian Cramer wrote: > export PS1=3D"%B%(?..[%?] )$fg_bold[red]%b$fg_no_bold[black]%n@%U%m%= u:%1~>" >=20 > but this does not work for me. The prompt remains the same but > expansion/expanding on the commandline gets a hickup. My TERM is set > to "xterm" and normally colored output is no problem. You should enclose your color definitions between '%{' and '%}' From the manual page: ,-----[man zshall] | PROMPT EXPANSION | [...] | Visual effects | [...] | %{...%} | Include a string as a literal escape sequence. The string= within | the braces should not change the cursor position. Brace p= airs can | nest. `----- Try something like this % ps_beg=3D"%B%{$fg_bold[red]%}%(?..[%?] )%b%{$fg_no_bold[black]%}%n@%U%m%u= :" % ps_end=3D"%1~>%{$fg_bold[default]$fg_no_bold[default]%}" % export PS1=3D"${ps_beg}${ps_end}" I don't know if "%fg_bold[default]$fg_no_bold[default]" is really necessary here ... Btw, %b you mentioned is the end of bold output. See also the manual page (man zshmisc search for PROMPT EXPANSION) So long, tkr --=20 *** Topic for #redhat: ReDHaT is the answer to all your problems. It could be the start too! --Signature_Wed__7_Sep_2005_09_53_01_+0200_ObNQST+MZchmjrUk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDHpxg1nqhlTkOjuwRAiOjAJ4+A3LGF6uz/XDI0IJV+/5zQMyxfgCdGl47 Ybcvko05ECWmfOke4WOhwoo= =CxEP -----END PGP SIGNATURE----- --Signature_Wed__7_Sep_2005_09_53_01_+0200_ObNQST+MZchmjrUk--