Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Function installation



I've written a patch for installing the functions from the source
distribution, but as it involves moving files between directories it's not
very convenient to post and instead I'll leave it for pws-21.

Here's what I've done:

* --enable-fndir=directory allows you to specify a function installation
  directory; default is ${datadir}/zsh-fns, almost certainly
  ${prefix}/share/zsh-fns

* The given directory is compiled as the default value for $fpath/$FPATH

* `make install' or `make install.fns' will install all functions from
  under Completion and Functions into that directory, `make uninstall' or
  `make uninstall.fns' will delete them.

* --disable-fndir or --enable-fndir=no turns off both installation of
  functions and the default $fpath/$FPATH

* Functions now contains two subdirectories, Misc and Zftp, where all the
  functions themselves live (parallels Completion, and allows $dir/* for
  installation so as not to have to list all files in the Makefile).

Any views on overwriting behaviour?

- always overwrite existing installed functions

- never overwrite

- compare each file with the installed version, if it differs move the old
  one to $file.old (unconditionally) and install the new one --- slow but
  safer

- something devilishly clever

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author