From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2167 invoked from network); 18 Sep 2006 18:57:05 -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; 18 Sep 2006 18:57:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 90976 invoked from network); 18 Sep 2006 18:56:57 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Sep 2006 18:56:57 -0000 Received: (qmail 2343 invoked by alias); 18 Sep 2006 18:56:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22739 Received: (qmail 2334 invoked from network); 18 Sep 2006 18:56:54 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Sep 2006 18:56:54 -0000 Received: (qmail 90756 invoked from network); 18 Sep 2006 18:56:54 -0000 Received: from smtp3-g19.free.fr (212.27.42.29) by a.mx.sunsite.dk with SMTP; 18 Sep 2006 18:56:50 -0000 Received: from localhost (evr91-1-82-227-12-160.fbx.proxad.net [82.227.12.160]) by smtp3-g19.free.fr (Postfix) with ESMTP id 952EB49988 for ; Mon, 18 Sep 2006 20:56:48 +0200 (CEST) Date: Mon, 18 Sep 2006 20:56:17 +0200 From: "arno." To: zsh-workers@sunsite.dk Subject: [PATCH]: prompt -c never tells : "Current prompt is not a theme" Message-ID: <20060918185617.GA12734@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi % autoload -U promptinit % prompt -c Current prompt theme is: instead of=20 % prompt -c Current prompt is not a theme. (As I have not set a prompt theme yet) This is because in Functions/Prompt/promptinit (function set_prompt): if (( $+prompt_theme )); then [...] else print "Current prompt is not a theme." fi But as prompt_theme is set when promptinit loads: typeset -gU prompt_themes $+prompt_theme always returns 1 (even when prompt_theme is empty) and else branch is never reached. May be -n $prompt_theme would be=20 better ? Here is a patch : arno. diff -Nur zsh-4.3.2/Functions/Prompts/promptinit zsh-4.3.2~/Functions/Promp= ts/promptinit --- zsh-4.3.2/Functions/Prompts/promptinit 2005-05-16 12:17:09.000000000 +0= 200 +++ zsh-4.3.2~/Functions/Prompts/promptinit 2006-09-18 20:44:30.000000000 += 0200 @@ -91,7 +91,7 @@ ;; esac case "$opt" in - c) if (( $+prompt_theme )); then + c) if [[ -n $prompt_theme ]]; then print -n "Current prompt theme" (( $#prompt_theme > 1 )) && print -n " with parameters" print " is:\n $prompt_theme" --tThc/1wpZn/ma/RB 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) iD8DBQFFDuvRiH9aBScBsrMRAow7AJ0Wu5+WG5wrUVcuNXgrVwyTDmyA6gCfXnJx jqhMb7LH7svtojA7rXWQOUI= =Xk66 -----END PGP SIGNATURE----- --tThc/1wpZn/ma/RB--