From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26212 invoked by alias); 27 Jul 2011 18:18:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29623 Received: (qmail 8021 invoked from network); 27 Jul 2011 18:18:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110727111829.ZM22827@torch.brasslantern.com> Date: Wed, 27 Jul 2011 11:18:29 -0700 In-reply-to: Comments: In reply to Mikael Magnusson "Re: completers using zstat don't work with zmodload -F zsh/stat" (Jul 27, 6:44pm) References: <110727012046.ZM21543@torch.brasslantern.com> <110727093848.ZM22383@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: completers using zstat don't work with zmodload -F zsh/stat MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 27, 6:44pm, Mikael Magnusson wrote: } Subject: Re: completers using zstat don't work with zmodload -F zsh/stat } } # alias zstat='builtin stat' } # rm $fpath[3].zwc* } removed `/usr/local/share/zsh/4.3.12-dev-1/functions.zwc' } removed `/usr/local/share/zsh/4.3.12-dev-1/functions.zwc.old' } # for a ($fpath) {[ -w $a:r -a $a/_*(N[1]) ] && zrecompile -p -U -z } $a.zwc $a/_*} } re-compiling /usr/local/share/zsh/4.3.12-dev-1/functions.zwc: succeeded } } % umount } _canonical_paths_add_paths:6: no such builtin: stat This must be happening because _canonical_paths_add_paths isn't actually defined until _canonical_paths is executed, so the -U option to zcompile doesn't have a chance to come into effect. This is going to be a problem with any completion source file that has multiple embedded function definitions. It MIGHT help to both use "zcompile -a" and also change _canonical_paths from using _canonical_paths_add_paths () { ... } to using the load-once paradigm (( $+functions[__canonical_paths_add_paths] )) || _canonical_paths_add_paths () { ... } but I'm not confident of that.