zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Document where third-party completion functions should be installed.
@ 2020-01-26  3:35 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2020-01-26  3:35 UTC (permalink / raw)
  To: zsh-workers

---
This question comes up somewhat regularly when third parties write
completion functions that they ship themselves.

33113 answered this question by adding /usr/local/share/zsh/site-functions/ to
the default $fpath unconditionally.  That is different to what this patch
recommends, but I think the process this patch describes is standard.  For
example, Oliver points out that this is how man pages are handled: they get
installed to $prefix/share/man/ of their package, and after installation one
needs to tell man(1) about that location separately, by setting $MANPATH.  The
same goes for executables (add $prefix/bin to $PATH), include files (add
$prefix/include to $CFLAGS), shared libraries (add $prefix/lib to $LDFLAGS),
etc..

Cheers,

Daniel


 INSTALL | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/INSTALL b/INSTALL
index cf70893a7..a85a40a24 100644
--- a/INSTALL
+++ b/INSTALL
@@ -251,6 +251,16 @@ source code in the directory that "configure" is in.  For example,
 Note that this is mutually exclusive with using the source directories
 as make can become confused by build files created in the source directories.
 
+Writing third-party autoloadable functions
+------------------------------------------
+
+Third-party autoloadable functions, including but not limited to completion
+functions, should be installed into the share/zsh/site-functions/ directory
+under the respective installation prefix.  That would typically be written as
+$(DESTDIR)$(PREFIX)/share/zsh/site-functions/ in a makefile.  If the
+third-party tool's $(PREFIX) is not the same as zsh's prefix, then that
+directory should be added to $fpath in zsh's initialization files.
+
 
 ================================
 AUTOMATIC NEW USER CONFIGURATION

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-26  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26  3:35 [PATCH] Document where third-party completion functions should be installed Daniel Shahaf

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).