From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16061 invoked from network); 2 Apr 2021 11:57:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Apr 2021 11:57:12 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617364632; b=Rzb8SQ5G1e0cFfjhNk/PLck8Md4JDCdf39ItVIu7b8vucZ8uL9/+s6PRUzdT2QfbPWQaIm6AFL vfD9ONdb8DDuZmbCgwGxijNZz+RWw2WBdY9j17n9oIr0OHzVYogt3wrogt1lwFbsO1gGFaOdrc xT+eQEB/niCerZLOjHeq5U9a0IZghXsNQNSr1CtV6HX/x66F/NH+sM95sZj0bV+M7CNmfFdbn6 C2iETzNC+vlJtURv9jsNDQMwoImWIdlzgTb3TMX9u7RyiTsOUlrWlM6D9COkRza50sH08+fGVZ /V6tUjvTAAmnNLqXAlb8h5Z3jmTICgf4g07D7N+LVdDNRA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtprelay07.ispgateway.de) smtp.remote-ip=134.119.228.104; dmarc=none header.from=zsh.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617364632; bh=mbeEcPGEVoJ7+LqViTAFdvH8zkmVGpE2aV2M5xvyIdg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:DKIM-Signature; b=bdniU3y9g/6SLu1DcQdBo4GqHBjjWtRYH2rTKcNMyCpLtLmpcbV19YTkiKRajsRPqzdh2ZiUTY MTGQ083j4S2B79GcTnEhA1w91Uyt4DpAXCXon2vYj9iINEwwYEhRX+Y/igscUUC9vv4JkEQRaT d4YUCHqCiSwU+1FmUJqryAmjCxkrBGj0lvDQh6oYGDoYKBDkqr6SPUlCO6pwY4xTZ549k0KqAu pJATWpW+0NGpGrAfWmiS7qnnECYTl6jJKCsr6cGa1T2SCU7E6w/Uf7kZQiIiXjoS14zIfk/DXX rGQ5rHuKFoQ2Qt1dvjrgrFOX4nmkHzyVhGfk2+WVS9RlPw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=e+mz7r9U1xwv/4aPyzmQrDK36o23U/vfOai2LVwhTN8=; b=U0W9lkrPEkK4aLNnxZ0PxTAhHf AF0LFn4ywHOkTUNN5JTv1aEV/zDmGfS5Lel8A8AdkqnDyYQhxKhWJ1IM2Zwfv2b6G9lDlOHBEoVuV oG0KTUfmLkKoWLweY/MYRpFWQg+nLFayorVhzFVu4RCn7UIekf0SKE9EhlZvzYZ0u6rTF5Lx+0JFg xI4DR2i4qmlxYSNS8HEiEX8Hgxidwq4yFv33SAC4vf0lpxt3eoYjXEcKdNjFyDHBvzGQIlh5CBBVe 1Oin2ouaGfnqUq+LlUcIkYkGQSi/7Qpvobanud5GTf4Sh9tMBKaqF4nsO96c0SAtRHee6yC1Gbx6W GFBirC4Q==; Received: from authenticated user by zero.zsh.org with local id 1lSIQI-0000F6-J0; Fri, 02 Apr 2021 11:57:10 +0000 Authentication-Results: zsh.org; iprev=pass (smtprelay07.ispgateway.de) smtp.remote-ip=134.119.228.104; dmarc=none header.from=zsh.org; arc=none Received: from smtprelay07.ispgateway.de ([134.119.228.104]:46809) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lSIPv-000069-NR; Fri, 02 Apr 2021 11:56:48 +0000 Received: from [79.194.166.79] (helo=jim.voodoo.lan) by smtprelay07.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lSIPf-0005F7-DR; Fri, 02 Apr 2021 13:56:31 +0200 Received: by jim.voodoo.lan (Postfix, from userid 1000) id E757F63FB0F; Fri, 2 Apr 2021 13:56:41 +0200 (CEST) From: Frank Terbeck To: "Daniel Shahaf" Cc: zsh-workers@zsh.org Subject: Re: Question to maintainers of third-party packages that install zsh completions In-Reply-To: <65b1ebd7-d090-4642-b755-ad4a0eec34cf@www.fastmail.com> (Daniel Shahaf's message of "Thu, 01 Apr 2021 23:11:28 +0000") References: <65b1ebd7-d090-4642-b755-ad4a0eec34cf@www.fastmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Fri, 02 Apr 2021 13:56:41 +0200 Message-ID: <87zgyg3nnq.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: NDMwNDQ0 X-Seq: 48376 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Hi, Daniel Shahaf wrote: > Where would you expect the answer to "How does one install third-party > zsh completions in such a way that zsh will pick them up automatically?" > to be found? I'd like to make sure the documentation has this > information where people who look for it will find it. Tough question to answer in full generality. Depends on the kind of in- stallation you're interested in, too. Debian's vendor package, for exam- ple, has the following convention=C2=B9: [..snip..] Load-path for functions from other packages ------------------------------------------- In respsonse to #620452, the zsh-binary from Debian's zsh package star- ted to provide two entries to $fpath (the search path for loadable func- tions) for other packages to drop function files into: - /usr/share/zsh/vendor-completions for functions that add functiona- lity to zsh's function based completion system (compsys) - /usr/share/zsh/vendor-functions for all other functions If you maintain another Debian package that wants to add functions to zsh's function load-path, please use the those conventions when instal- ling function files. [..snap..] This was done to keep =E2=80=98/usr/local/share/zsh/site-functions=E2=80= =99 available for purely local additions to the load-path. Debian does not put the =E2=80=98site-functions=E2=80=99 directory into =E2=80=98/usr=E2=80=99 (sa= ns /local), because the non- local part of =E2=80=98/usr=E2=80=99 is meant to be managed by Debian's pac= kage system. Not all vendors do this, of course. But it neatly keeps package and site local installation separate. Still, however, the =E2=80=98site-functions=E2=80=99 directory is always th= e first entry in the load-path list, based on all compile-time options. So, for purely local function installation, this may be good enough: zsh -f -c 'print ${fpath[1]}' Vendors may have additional requirements when it comes to their package system. Regards, Frank =C2=B9 https://salsa.debian.org/debian/zsh/-/blob/debian/debian/README.Debi= an