From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27416 invoked from network); 14 Aug 2006 22:36:40 -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 22:36:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 65398 invoked from network); 14 Aug 2006 22:36:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 22:36:33 -0000 Received: (qmail 28841 invoked by alias); 14 Aug 2006 22:36:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10605 Received: (qmail 28831 invoked from network); 14 Aug 2006 22:36:24 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Aug 2006 22:36:24 -0000 Received: (qmail 64294 invoked from network); 14 Aug 2006 22:36:24 -0000 Received: from nf-out-0910.google.com (64.233.182.186) by a.mx.sunsite.dk with SMTP; 14 Aug 2006 22:36:24 -0000 Received: by nf-out-0910.google.com with SMTP id c31so104932nfb for ; Mon, 14 Aug 2006 15:36:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kvPL0sRmbl/0Bsb/g6HBV1Rt7FHwpQMR+wyBgauCvo3K+CNw9GFccOqvO0REDw+3Uh1E+YKVSz3yQy09lmq0EGH5yn6PRbY742qboSALLXV4M/5hKFk55wpJIdyfPOIXjGElwDdMEneTelLvwJlMf4VOJXrp70PKgpHWAl7uyhw= Received: by 10.49.8.15 with SMTP id l15mr387475nfi; Mon, 14 Aug 2006 15:36:23 -0700 (PDT) Received: by 10.78.178.17 with HTTP; Mon, 14 Aug 2006 15:36:23 -0700 (PDT) Message-ID: Date: Tue, 15 Aug 2006 00:36:23 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Peter Stephenson" Subject: Re: Completing a unique prefix of "script" completes "script" Cc: zsh-users@sunsite.dk In-Reply-To: <20060814131259.596d6ece.pws@csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200608102141.k7ALfw4J005496@pwslaptop.csr.com> <20060814131259.596d6ece.pws@csr.com> X-Google-Sender-Auth: b070a4f924911bf6 On 8/14/06, Peter Stephenson wrote: > "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. Nope. It seems zmodload returns before the hash table is fully initialized. If I put a "sleep 1" in there it works, but without it it'll still complain about the command not being hashed. Actually, a "sleep 0" seems to work as well... That's /one/ thing /I/ don't understand... nikolai