From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16266 invoked from network); 12 May 2006 09:52:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) 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.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 May 2006 09:52:37 -0000 Received: (qmail 62910 invoked from network); 12 May 2006 09:52:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 May 2006 09:52:29 -0000 Received: (qmail 28044 invoked by alias); 12 May 2006 09:52:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22440 Received: (qmail 28035 invoked from network); 12 May 2006 09:52:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 May 2006 09:52:27 -0000 Received: (qmail 62671 invoked from network); 12 May 2006 09:52:27 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 12 May 2006 09:52:26 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly21d.srv.mailcontrol.com (MailControl) with ESMTP id k4C9qPj0007281 for ; Fri, 12 May 2006 10:52:25 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 12 May 2006 10:51:40 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.4/8.13.4) with ESMTP id k4C9qOYm027804 for ; Fri, 12 May 2006 10:52:24 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k4C9qN4d027801 for ; Fri, 12 May 2006 10:52:24 +0100 Message-Id: <200605120952.k4C9qN4d027801@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) In-Reply-To: <237967ef0605111440w2c2f37c1j6ccca5188d680e2f@mail.gmail.com> Subject: Re: Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Date: Fri, 12 May 2006 10:52:23 +0100 From: Peter Stephenson X-OriginalArrivalTime: 12 May 2006 09:51:40.0567 (UTC) FILETIME=[AB032270:01C675A9] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-06-00-05 (www.mailcontrol.com) on 10.68.0.131 "Mikael Magnusson" wrote: > One thing that has annoyed me recently is that 'stat autoloads > zsh/stat without me asking for it, I never know which stat version is > loaded and the options aren't compatible. Should I live with it and > alias stat=command stat or is it a bug in the completer? If i have the > alias and load the module manually i'll still use the command so it's > still not a perfect solution. The stat completion itself appears not to require zsh/stat, but it's used elsewhere. Quite possibly the culprit is my _list_files addition, which loads the module even if you're not using the feature. Does the following help? (CVS is unwell) --- Completion/Unix/Type/_list_files.old 2006-05-12 10:40:39.000000000 +0100 +++ Completion/Unix/Type/_list_files 2006-05-12 10:40:34.000000000 +0100 @@ -15,8 +15,6 @@ listfiles=() listopts=() -zmodload -i zsh/stat 2>/dev/null || return 1 - zstyle -a ":completion:${curcontext}:" file-list stylevals || return 1 # TODO: more flexible way of handling the following? e.g. use $compstate? @@ -48,6 +46,8 @@ (( ok )) || return 1 +zmodload -i zsh/stat 2>/dev/null || return 1 + for f in ${(P)1}; do if [[ ! -e "${2:+$2/}$f" ]]; then listfiles+=("${2:+$2/}$f") -- 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