From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5730 invoked from network); 25 Jun 1999 06:16:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Jun 1999 06:16:50 -0000 Received: (qmail 24269 invoked by alias); 25 Jun 1999 06:16:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6837 Received: (qmail 24262 invoked from network); 25 Jun 1999 06:16:33 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: RE: Problem with autoloading completion functions Date: Fri, 25 Jun 1999 10:16:15 +0400 Message-ID: <006501bebed2$3b4379c0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal In-Reply-To: <006401bebe62$a37dddc0$21c9ca95@mow.siemens.ru> > > I had this 'autoload $^fpath/*(N:t)' in my .zshrc ... and all worked nice and > fine ... until I suddenly found that subscript does not work as expected. > Well, thinking more about it I believe we really need file name in autoload. So, what about: autoload -f fn1 fn2 ... (with possible extension, that if is a directory, we look at /fn1 /fn2 ...) If no -f is given, fallback to searching fpath. install completion function into ${prefix}/zsh/completion assign initial value to cpath (_cpath, completion_path - does not actually matter). It has additional benefit, that you can test for existence of cpath to check if completion was installed 'course, "real" functions like compdump, compinit(?) should be if $fpath modify compinit to use cpath instead. Possible extension is ``compinit ...'' - meaning, look in path1, path2 ... for completion functions. The above has one more advantage - it allows new function subsystem (meaning, set of related functions) be easily defined, installed and used as a single entity. Without messing up with global fpath. Any comments? /andrej