zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: "Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: Re: Function installation
Date: Mon, 07 Jun 1999 14:22:14 +0200	[thread overview]
Message-ID: <9906071222.AA30021@ibmth.df.unipi.it> (raw)
In-Reply-To: ""Andrej Borsenkow""'s message of "Mon, 07 Jun 1999 13:37:24 DFT." <000501beb0c9$597a60a0$21c9ca95@mow.siemens.ru>

"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 <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-06-07 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-07  7:53 Peter Stephenson
1999-06-07  9:06 ` Wayne Davison
1999-06-07  8:58   ` Peter Stephenson
1999-06-07 16:41     ` Wayne Davison
1999-06-07  9:37 ` Andrej Borsenkow
1999-06-07 12:22   ` Peter Stephenson [this message]
1999-06-07 13:14     ` Andrej Borsenkow
1999-06-07 12:57 Sven Wischnowsky

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=9906071222.AA30021@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.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).