From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13786 invoked from network); 14 Aug 2006 12:13:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Aug 2006 12:13:31 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 50161 invoked from network); 14 Aug 2006 12:13:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 12:13:22 -0000 Received: (qmail 24191 invoked by alias); 14 Aug 2006 12:13:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10602 Received: (qmail 24182 invoked from network); 14 Aug 2006 12:13:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Aug 2006 12:13:11 -0000 Received: (qmail 48982 invoked from network); 14 Aug 2006 12:13:11 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 12:13:10 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly18d.srv.mailcontrol.com (MailControl) with ESMTP id k7ECCv4r005331 for ; Mon, 14 Aug 2006 13:13:04 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 14 Aug 2006 13:13:01 +0100 Date: Mon, 14 Aug 2006 13:12:59 +0100 From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: Completing a unique prefix of "script" completes "script" Message-Id: <20060814131259.596d6ece.pws@csr.com> In-Reply-To: References: <200608102141.k7ALfw4J005496@pwslaptop.csr.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.6.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 Aug 2006 12:13:01.0151 (UTC) FILETIME=[FCAA0EF0:01C6BF9A] X-Scanned-By: MailControl A-07-04-01 (www.mailcontrol.com) on 10.68.0.128 "Nikolai Weibull" wrote: > It seems that the hash table is initialized after .zshrc is read. Is > there a way to run some scripts after everything is initiaziled? Hmm... I haven't looked at the source but in my case it seems to be being hashed straight away... zsh -f -c 'zmodload -i zsh/parameter print $commands[script] unhash script print $commands[script]' prints /usr/bin/script the first time and nothing the second time. /etc/zshenv is empty. Aha---it looks like zsh/parameter is filling the hash table itself (based on the HASHLISTALL option which is on by default). So maybe putting zmodload -i zsh/parameter early in your initialization file (it'll probably be loaded by the completion system later anyway) is good enough. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php