From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5114 invoked from network); 4 Oct 2004 16:12:01 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Oct 2004 16:12:01 -0000 Received: (qmail 55413 invoked from network); 4 Oct 2004 16:11:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Oct 2004 16:11:56 -0000 Received: (qmail 3027 invoked by alias); 4 Oct 2004 16:11:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20448 Received: (qmail 2985 invoked from network); 4 Oct 2004 16:11:10 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Oct 2004 16:11:10 -0000 Received: (qmail 52098 invoked from network); 4 Oct 2004 16:10:10 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 4 Oct 2004 16:10:09 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i94GA5gl012606; Mon, 4 Oct 2004 09:10:05 -0700 Date: Mon, 4 Oct 2004 09:10:05 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: Peter Stephenson cc: Zsh hackers list Subject: Re: compinit dumps too many files for autoloading In-Reply-To: <200410041137.i94Bb2AD029213@news01.csr.com> Message-ID: References: <200410041137.i94Bb2AD029213@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Mon, 4 Oct 2004, Peter Stephenson wrote: > If I am using a complicate completion such as _perforce which defines > its own functions, then run compinit again, all those functions are > marked for autoloading in .zcompdump. The patch below "fixes" it, but that cross-product null-glob causes a noticeable delay on my limping old 233MHz home system. While we're on the subject, does anyone remember why the tilde (~) appears in the following expansion of fpath in compdump (line 26 in my copy)? _d_files=( ${^~fpath:/.}/^([^_]*|*~|*.zwc)(N) ) I can't come up with a reason you'd want patterns in fpath globbed there. Same thing a few lines lower for _d_wfiles. Here's the patch. It just occurred to me that this breaks if some .zwc files contain the function definitions but the original function files are missing, so I'm not going to commit it just yet. Index: Completion/compdump =================================================================== RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/compdump,v retrieving revision 1.5 diff -c -r1.5 compdump --- Completion/compdump 22 Jun 2004 07:53:03 -0000 1.5 +++ Completion/compdump 4 Oct 2004 15:57:05 -0000 @@ -103,7 +103,9 @@ # Autoloads: look for all functions beginning with `_'. -_d_als=(${(o)$(typeset +fm '_*')}) +_d_als=( $(typeset +fm '_*') ) +_d_als=( ${^fpath}/${^_d_als}(N) ) +_d_als=( ${(ou)_d_als:t} ) # print them out: about five to a line looks neat