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 30500 invoked from network); 2 May 2022 18:07:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 May 2022 18:07:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1651514879; b=TmEjcD23HHFM7ZbXHHaBDv4g7ZqhyuZ0omLcdczsk6LmUFQf4LScmteeCNberkNyMTZQk/buxt Ex7SSKdLZLoHq1oZVm0p+DfZ6Xkic78MTKRzrb50k0ZvHCOKdqa7g0lb80mdwrm7cvrClltXfs FdgRsRyM+nxMcpNQWGcRpbQ+YiGz8g35daI+DhvXl062CGnnmxAuYSI4TCDLrsTpOUm0jwMRfq 83piD6fmt8E4x0rRDWQ3cfxzbPfe2sBHU86+B3SK8TdbYvZt0UAfqBFq0C6yykT/oMMA/yf1/l hfvXr1j4r59swRse92kmXhP1W4gRoL/0gh62Mvgj9nxeiA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mout02.posteo.de) smtp.remote-ip=185.67.36.66; dkim=pass header.d=posteo.de header.s=2017 header.a=rsa-sha256; dmarc=pass header.from=posteo.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1651514879; bh=SRWJmNEcJlVvLY7/3itsgCDT4w1eZLRbqkbrRw+pEvM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature; b=qo2FKmT+thAxTBnh1L5PqVFChB53ZCTMgg/LHjludgNTJSnlaZcElCyM88jClbI1Pn2rcg5+Ld Znd0HP6Pw//vlGQBJjFn6oO4h5UUCn+2Lyq1tD6OCnzWuN/ID1kL5UkOx47mfx7COMWAgXjqen /lrUqSVeX+l0L69D9CIefBLcmx66FKUzXK+spHFXJAylNqijnVkr3sfWgUaZPHacCye3kw0T/s 8mkHRarls0QcVpz6vdNpeWpzDPv7txfSDN3U7znTcXzqZlKQRia7Ln8a1iOt8ppWXlrhgsin+M jupOxqqw7yVAJw/99tz2Gjgo4STgvvxfUCCBklZXPN0vkw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4S8XKdrH+QitcdQtRxb1TK4zel10xebugx4d5B1FK40=; b=NnB/iHz4cm2HhUwh8ccj/VAN9O jvLHbT3DNqaOa21ujGxrd/y1+vNh2Fqq09Mjxsy2SrEfTtyO6K/MOGs0haufEyd2+omGixYXOZ310 K9Am3ENe1aJMj/T38Yz4VGT2Uc5WJY92LapV9PtcmQrS4SllKD2MNpFe1Lyva/XW2OoZN7LxAa+wu Dv8XFmiabBibwHGb9n2EN0g3Zbc4+4qdXlwk7MhShrPK0UaK1Ghh9QXrhRSQLFtsKyAQ1fTNWWCHB d0roviso8OiYLxCmSqG9oWx0Fc0gda2xD0prqWxgftSxO8Pu4BjvLvf/1BEJ9qKjHcyEkkc8nwQ5X Mx/anPxQ==; Received: from authenticated user by zero.zsh.org with local id 1nlaSk-000EST-Ai; Mon, 02 May 2022 18:07:58 +0000 Authentication-Results: zsh.org; iprev=pass (mout02.posteo.de) smtp.remote-ip=185.67.36.66; dkim=pass header.d=posteo.de header.s=2017 header.a=rsa-sha256; dmarc=pass header.from=posteo.de; arc=none Received: from mout02.posteo.de ([185.67.36.66]:34961) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nlaRR-000DfZ-W5; Mon, 02 May 2022 18:06:38 +0000 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 0EC3D240107 for ; Mon, 2 May 2022 20:06:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1651514797; bh=SRWJmNEcJlVvLY7/3itsgCDT4w1eZLRbqkbrRw+pEvM=; h=Date:Subject:To:From:From; b=qpiyXOKcBOoUE4V1p0hsckcCVamfJQWGKrQ+XCRI9EKWZT2OdfW1qmDLxowY9glKY qQGGetaaG9NZZL9R1VFfkA4SdkYgc7oLr41/8PSTyLTwxGsoy+E+Z72RPvWHGVIFSa +F2w407Dp7/gw+81/mrK6UpdrBv50IUzucK2YfpokDC3nPKI2TiI3P4tEjyjsBgGv0 9FBha5r2/iip0FFqKF/YJjxXRxUCctIQI0Q86sF/3Bik2kImF4j5vW/Y8XZWPwh+sz R9+qrsVXiFwR6SRJozDrly3FZniQDNXfWj+Ch/usSj0bhNSY0z5yphwCHyoSm214/1 nhfoHe34AGmXA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KsWHw4ryPz9rxg for ; Mon, 2 May 2022 20:06:36 +0200 (CEST) Message-ID: <12af3d6d-e6fb-c35b-cc23-d7950db705f1@posteo.de> Date: Mon, 2 May 2022 18:06:32 +0000 MIME-Version: 1.0 Subject: Re: Where to put my own completions? Content-Language: en-US To: zsh-users@zsh.org References: <0fe4c854-85a5-3b4a-0a81-cfca1e00f7ae@posteo.de> From: Manfred Lotz In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Seq: 27717 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 5/2/22 15:07, Daniel Shahaf wrote: > Manfred Lotz wrote on Mon, 02 May 2022 11:31 +00:00: >> I have some completions outsided of packages. Once I decided to put those >> completions into ~/.zfunc directory and define things like follows >> >> fpath+=~/.zfunc >> autoload -Uz compinit >> zstyle ':completion:*' menu select >> compinit >> >> >> Question: Is there a recommended directory where to put completions into, or is >> it just like "Do what you want!" ? > > I tend to put them in my zshrc alongside the function definitions: > > f() { echo $1 $2 } > _f() { _arguments "1:foo" "2:bar" } > compdef _f f > > It's convenient since they tend to change in lockstep. > Thanks for your reply. I personally prefer to have a single file for each completion. I don't want to fill the .zshrc with different completions where each completion could have 40-70 lines or so. > Or one could use the XDG envvars / default paths: > https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html > > And for system-wise completions there's the site-functions dir, part of the default $fpath. > >From your reply I take that there is no recommendation from zsh perspective. -- Manfred