From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2001 invoked from network); 18 May 2008 01:35:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 May 2008 01:35:50 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4126 invoked from network); 18 May 2008 01:35:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 May 2008 01:35:36 -0000 Received: (qmail 27676 invoked by alias); 18 May 2008 01:35:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25061 Received: (qmail 27659 invoked from network); 18 May 2008 01:35:31 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 May 2008 01:35:31 -0000 Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by bifrost.dotsrc.org (Postfix) with ESMTP id 2EE7580589A4 for ; Sun, 18 May 2008 03:35:28 +0200 (CEST) Received: from torch.brasslantern.com ([71.116.113.54]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K1100BETJ2OGZ7C@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 17 May 2008 20:35:13 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id m4I1ZBLP012226 for ; Sat, 17 May 2008 18:35:12 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id m4I1ZAUR012225 for zsh-workers@sunsite.dk; Sat, 17 May 2008 18:35:10 -0700 Date: Sat, 17 May 2008 18:35:10 -0700 From: Bart Schaefer Subject: Re: PATCH: update prompt themes In-reply-to: <4430.1211063817@pws-pc> To: zsh-workers@sunsite.dk (Zsh hackers list) Message-id: <080517183510.ZM12224@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <4430.1211063817@pws-pc> Comments: In reply to Peter Stephenson "PATCH: update prompt themes" (May 17, 11:36pm) X-Virus-Scanned: ClamAV 0.91.2/7146/Sun May 18 02:58:16 2008 on bifrost X-Virus-Status: Clean On May 17, 11:36pm, Peter Stephenson wrote: } } - Overhaul of use of precmd and preexec. Use the hook functions } designed for exactly this purpose so as not to trash any existing } use of the functions. Good plan, but: } - functions[precmd]="${functions[precmd]//prompt_bart_precmd}" } + precmd_functions[(r)prompt_*_precmd]= } + precmd_functions=($precmd_functions) I'm curious why the second assignment is necessary there. Remove an empty element? Couldn't you just do this? precmd_functions[(r)prompt_*_precmd]=() Or perhaps better add-zsh-hook -D precmd 'prompt_*_precmd' (Or do I misunderstand the -D option you added?) } # Abuse the fg assoc to hold our selected colors ... } - fg[%m]=$fg[${1:-red}] Er, the fg assoc came from Functions/Misc/colors which you're no longer including, so it's no longer "abuse" to do this to the $fg that you've declared global in this same function. All of the above is in prompt_bart_setup ... I skimmed the other diffs but didn't try as hard to understand what they were doing.