zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: compinit dumps too many files for autoloading
Date: Mon, 4 Oct 2004 09:10:05 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0410040859350.25270@toltec.zanshin.com> (raw)
In-Reply-To: <200410041137.i94Bb2AD029213@news01.csr.com>

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
 


      reply	other threads:[~2004-10-04 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 11:36 Peter Stephenson
2004-10-04 16:10 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0410040859350.25270@toltec.zanshin.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).