From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13184 invoked from network); 7 Jun 1999 12:51:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jun 1999 12:51:14 -0000 Received: (qmail 26055 invoked by alias); 7 Jun 1999 12:50:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6503 Received: (qmail 26048 invoked from network); 7 Jun 1999 12:50:55 -0000 Message-Id: <9906071222.AA30021@ibmth.df.unipi.it> To: "Zsh hackers list" Subject: Re: Function installation In-Reply-To: ""Andrej Borsenkow""'s message of "Mon, 07 Jun 1999 13:37:24 DFT." <000501beb0c9$597a60a0$21c9ca95@mow.siemens.ru> Date: Mon, 07 Jun 1999 14:22:14 +0200 From: Peter Stephenson "Andrej Borsenkow" wrote: > > * --enable-fndir=directory allows you to specify a function installation > > directory; default is ${datadir}/zsh-fns, almost certainly > > ${prefix}/share/zsh-fns > > Peter, are you so fond of cryptic names? Why not simply {datadir}/zsh or, at > least, ${datadir}/zsh/functions ? (In hope, that may be some more stuff will > evtl go into base dir). Well, yes, actually... but zsh/functions is fine. > Peter, what about something like this: > > use variables like FUNCTIONS_INCLUDE and/or FUNCTIONS_EXCLUDE. They could be > initialized by configure; and then I could set FUNCTIONS_EXCLUDE='Commands/* > User/*' FUNCTIONS_INCLUDE='Users/_configure' to get only this one installed? FUNCTIONS_INSTALL (as I've called it) was easy to add. I've made it get set by default to all the Completion subdirectories, and Zftp/* gets added if dynamic is turned on, but you can override it in configure or make. Is FUNCTIONS_EXCLUDE important? Things get excluded anyway unless they're in FUNCTIONS_INSTALL, so "make install FUNCTIONS_INSTALL='Core/* Base/* Builtins/* Users/_configure'" will do what you want. Excluding probably means looping over the exclusion variable inside the $FUNCTIONS_INSTALL loop, which I'd like to avoid. > Now, that we (almost) have the stuff there in fpath automagically, please, > consider once again making compinit a function. It would provide for > system-independent rc files - instead of figuring out, where the hell these > functions are placed here, you simply write compinit - and you're done. The stuff only gets put into fpath when you run compinit because it knows the path to compinit, which it wouldn't if it were a function; you'd have to give it the -f option. So the nettle of deciding where the things are has to be grasped anyway. But this is all supposed to be handled seamlessly by running compinstall. At least with the function installation stuff, you get a sensible default $fpath, which compinstall will check. One thing's been niggling at me: if there's a central function repository, and the user has their own functions, then compinit.dump has to be somewhere else, probably not in the same directory as compinit. It looks like compinit will need to be a bit smarter about working this out. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy