From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8428 invoked from network); 13 Oct 2007 17:17:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Oct 2007 17:17:48 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 52895 invoked from network); 13 Oct 2007 17:17:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Oct 2007 17:17:41 -0000 Received: (qmail 12920 invoked by alias); 13 Oct 2007 17:17:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23949 Received: (qmail 12906 invoked from network); 13 Oct 2007 17:17:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Oct 2007 17:17:38 -0000 Received: (qmail 52523 invoked from network); 13 Oct 2007 17:17:38 -0000 Received: from mtaout02-winn.ispmail.ntl.com (81.103.221.48) by a.mx.sunsite.dk with SMTP; 13 Oct 2007 17:17:31 -0000 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20071013171729.GLYY25022.mtaout02-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com> for ; Sat, 13 Oct 2007 18:17:29 +0100 Received: from pws-pc.ntlworld.com ([81.107.45.67]) by aamtaout04-winn.ispmail.ntl.com with ESMTP id <20071013171729.XFPH29112.aamtaout04-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sat, 13 Oct 2007 18:17:29 +0100 Received: from pws-pc.ntlworld.com (pws-pc.ntlworld.com [127.0.0.1]) by pws-pc.ntlworld.com (8.14.1/8.13.8) with ESMTP id l9DHGoqE004445 for ; Sat, 13 Oct 2007 18:16:50 +0100 Message-Id: <200710131716.l9DHGoqE004445@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: precmd, preexec, and supplied prompt themes In-Reply-To: Message from Clint Adams of "Sat, 13 Oct 2007 09:30:57 EDT." <20071013133057.GA1500@scowler.net> Date: Sat, 13 Oct 2007 18:16:50 +0100 Clint Adams wrote: > > typeset -a precmd_functions (Would probably need to be "typeset -ga ...") > > precmd_functions += my_prompt_precmd > > Since there is no unregistration hook, how would you avoid the problem > of precmd_functions containing (my_prompt_precmd her_prompt_precmd > his_prompt_precmd my_prompt_precmd) when switching back and forth? Presumably either you would add an unregistration hook when you gave the system the clean-up it needs, or more simply you would remove all existing entries of the form *_prompt_precmd from precmd_functions when you added a new one and enforce that format. Without some form of tidy-up the question is somewhat moot. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/