From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20326 invoked from network); 21 Oct 1999 15:44:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Oct 1999 15:44:58 -0000 Received: (qmail 6487 invoked by alias); 21 Oct 1999 15:44:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8363 Received: (qmail 6480 invoked from network); 21 Oct 1999 15:44:52 -0000 From: "Bart Schaefer" Message-Id: <991021150912.ZM10260@candle.brasslantern.com> Date: Thu, 21 Oct 1999 15:09:11 +0000 In-Reply-To: <380ED4B0.CB258973@u.genie.co.uk> Comments: In reply to Oliver Kiddle "Re: Alternate patch Re: PATCH: New prompt themes" (Oct 21, 9:54am) References: <380CC25A.BC019EC7@u.genie.co.uk> <991020041621.ZM6569@candle.brasslantern.com> <380ED4B0.CB258973@u.genie.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh workers Subject: Re: Alternate patch Re: PATCH: New prompt themes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 21, 9:54am, Oliver Kiddle wrote: } Subject: Re: Alternate patch Re: PATCH: New prompt themes } } > Further, I might suggest that instead of an assoc. array with both set and } > unset values, just use a regular array of only the values that are meant to } > be set; e.g. one command instead of a loop: } > setopt noprompt{bang,cr,percent,subst} prompt$^prompt_opts } > However, I didn't make that change either. } } That probably is better. An alternative patch to do it that way } follows. In that case: Index: Functions/Prompts/prompt_oliver_setup =================================================================== @@ -17,7 +17,7 @@ } prompt_oliver_setup() { - prompt_opts=( percent set ) + prompt_opts=( percent ) local pcol=$'\e['${1:-${pcolour[${HOST:=`hostname`}]:-33}}m local tcol=$'\e['${2:-${tcolour[$HOST]:-37}}m } The only thing I'm not sure about is whether it is wise that } promptcr is controlled by the prompt themes. I'd consider it to be } down to personal preference whether it's set or not. I also can't see } that it could be crucial to a particular theme so you might want to } remove cr from the brace expansion. I can't make up my mind about this. If you're going to remove it from the brace expansion, then you should probably also filter it out of the value of prompt_opts. On the other hand, almost no fancy prompt -- and certainly not one that uses the width of the screen and/or an RPROMPT -- works correctly when promptcr is turned off. Even Zle doesn't work very well when it only thinks it started out in the leftmost column. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com