From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id cc126a3e for ; Sun, 26 Jan 2020 03:36:16 +0000 (UTC) Received: (qmail 29673 invoked by alias); 26 Jan 2020 03:36:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45344 Received: (qmail 12770 invoked by uid 1010); 26 Jan 2020 03:36:09 -0000 X-Qmail-Scanner-Diagnostics: from wout5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25699. spamassassin: 3.4.2. Clear:RC:0(64.147.123.21):SA:0(-1.9/5.0):. Processed in 4.844663 secs); 26 Jan 2020 03:36:09 -0000 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: softfail (ns1.primenet.com.au: transitioning SPF record at amazonses.com does not designate 64.147.123.21 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvdekgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfggedutddqvdejucdlgedtmdenucfjughrpefhvf fufffkofgggfestdekredtredttdenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcu oegurghnihgvlhhshhesrghprggthhgvrdhorhhgqeenucfkphepjeelrddukedtrdehje drudduleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pegurghnihgvlhhshhesrghprggthhgvrdhorhhg X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] Document where third-party completion functions should be installed. Date: Sun, 26 Jan 2020 03:35:22 +0000 Message-Id: <20200126033522.22364-1-danielsh@apache.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Qmail-Scanner-2.11: added fake Content-Type header Content-Type: text/plain --- 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