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.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16169 invoked from network); 14 Jul 2023 18:09:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Jul 2023 18:09:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1689358162; b=czPx+uVBn3qs82mS++EPwr5beWZAgoQyRfAVaiaEpzOpwSC+D9IC51MIL8uZ3P0Cy2i0uclAzA /CpI2XHJkb6kZmFaunb+0yit7o0mXLAjVab0dUu8HOcdMIkgshAej4k0dAn0IV4JYJCR2cBZGz tgYMiiibAaKXzFzGM1oPLGwL1Sq8O/z3wB/Ows8smkKFrjTTEzybh08Lu98ZDxi6eqSz+gLLyb /WHNx0YjDnPtKdQIbVJp/jps7n/1WIsBEjx4luodlXIRwEMkqHww+4WjSON7n/aJR6rhQ0uVQK 54VVrub8AYfIP+8aBmOSpenIvLf+P44tNfQxjSt4IAbOkA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (redisdead.crans.org) smtp.remote-ip=185.230.79.39; dkim=pass header.d=crans.org header.s=mail header.a=rsa-sha256; dmarc=none header.from=crans.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1689358162; bh=bLJsQeJZrHAe4yN03vvIo0AwYrhz6fGrqydbgHvcZ34=; 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=hiPQjtFgMVOQQTI9hFyVMrzrY0Pz4/d662uN5L96h0ibJa1Vo/OGpT3s1UdERJ5yQkV+VaLUwr 1N8wLXjvwansaq8TVPjdiikiAEfIUeEun3r1vQmOnCMrIWJF67tK8kIzGdOjYJz9MOrHrdTRPQ yM3B+6p7gkKkiDp8QBfuQjGv/Dr0JrZ2W0VJWqdn/7j5m3ggPg+wvKMmjnzFfWZFkgfiUowrwm SnJnQbzJ1y7oL7lE1DWU35f4ZuhHdZ/REkAEiFvnB2w7JW4b7Xqrphef7t2sHIGEKvlmL7CG+k glyPJFmJnuVtqy2ZXimL/2yUIwkGpS2vkfxXBhQBTTWZgw==; 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=u0sJLwGrcfkQdhNACPDYyn4yTi3gk4aJJ+/U0xZv2oY=; b=ZgBTxJE9GdJrF+NfE1f1s4309a 0pUIM8Kh0HLqhNcSN2MiAcSkiEGSkEo5ggBbGnlIeZgJ/INrJ1YYu0CU2rF62OrAh6d3A3ZQlVnsA jSrd4RIK9SfQfA6St0javpwOIm25t4SKJnhWxpm2iQ66z6+UA5HTa2upy7WTunEumeJ36CpIXo6R1 An14xQuaxRIXSOm+9aX7JCbJam+U+j/Ireg8vRGmCGp2scRG0O5UDXLKnLkKMSBu8KL6DIbV/Qudd Zxr86b/HBQv1oWOfXA+mENapZgdaKsM4VaJNKBcXyi53vh/zORfJholnN+tRcA/L49lnNN8Wc17EP DDcPVcew==; Received: by zero.zsh.org with local id 1qKNEG-0004eq-M6; Fri, 14 Jul 2023 18:09:20 +0000 Authentication-Results: zsh.org; iprev=pass (redisdead.crans.org) smtp.remote-ip=185.230.79.39; dkim=pass header.d=crans.org header.s=mail header.a=rsa-sha256; dmarc=none header.from=crans.org; arc=none Received: from redisdead.crans.org ([185.230.79.39]:36792) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qKNDx-0004N3-5z; Fri, 14 Jul 2023 18:09:02 +0000 Received: from [IPV6:2a01:e0a:1aa:1110:5819:fff3:191f:8d6f] (unknown [IPv6:2a01:e0a:1aa:1110:5819:fff3:191f:8d6f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by redisdead.crans.org (Postfix) with ESMTPSA id 5970F1C4 for ; Fri, 14 Jul 2023 20:09:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crans.org; s=mail; t=1689358140; bh=bLJsQeJZrHAe4yN03vvIo0AwYrhz6fGrqydbgHvcZ34=; h=Date:Subject:To:References:From:In-Reply-To:From; b=qS3GijdXpPMAHKmY8UgjoEbSKHCvRBwNLG1AGkfwuOCQvUTzW5llp9DbM5Y3wsJii sGtccw3g7NObVLkiCZmxjTsfs7Z8AFgF5rl+fDzAB6bUlFTmwgyEOzJyco9Sck+9kj GxvWoYkSmjArkoMaorYZElF2OBDcYEMRPtEklTXvdfSH+TSdSpjdyRVTmzwxb9RCBZ rPEQu0UYoDItudBO8iAQDToVJpmpiaYjypH41ZpGJicQdAhpbwhupZHKgi1sWtKmM6 nf3bgoKualiD4zxelWsXfIllNvtPZu2AuqkncMmam65b9e4GpEqLN6PfsRzAYYEUT7 lDY7bUcUOZLqYi0DoFCvk/VzrzddIYPRE3cXQ3XJ8P26vsln+n4TH20Sd6RX8zk3VD gud+/ELF9fH6DjXSEmxf+zryH3TPG7JiI3GaIy6IIH/fn5UCAzbihEwCv7ZgOefDmT API5ZA0YqjcVmJr515f0hIRio2EPXnMphDHKXevPBg9Gj1mThaKB7NeXbfQptryCF0 A7pPpnqa8LIaKEY/07+73oOE3x4QbmXqVaSLJHz24NYST0k2Ho9NqXzca2FHk2yoTW zQwMhGFD4j3dwWoEebhsyYqxe8Vk+w4P4Yc83JA4+iQvZssZcl2Q33/gRRxdMoeBNx Mhw/jAKDpD3IevIkyRBLbENY= Message-ID: Date: Fri, 14 Jul 2023 20:08:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [feature] Provide a pkg-config file Content-Language: en-US, en-AU, fr To: zsh-workers@zsh.org References: <2k4aom63gjwye7qltsgrmihalb4dwilbqnzxffck32segn66pr@5a2zhmh4qhzn> From: Johan Grande In-Reply-To: <2k4aom63gjwye7qltsgrmihalb4dwilbqnzxffck32segn66pr@5a2zhmh4qhzn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 51933 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: Le 14/07/2023 à 19:34, Wu Zhenyu a écrit : > bash-completion has a pkg-config file, developers who want to provide completions can get the directory by I recently had the same problem of determining where to install the completion function for my program. Here's what I did, should this be useful to anyone. I'd be happy to hear if there is a better solution. Note: I believe I read somewhere that /usr/share/zsh/site-functions is always in fpath so forcing the user to install it there could be an option. Note2: For my personal use, this made me add ~/.local/share/zsh/site-functions to my fpath and I realized that another program had just assumed that this was the directory for completions and put its there and I was missing out on it. Makefile ``` ... ZSH_FUNCTIONS_DIR=$(PREFIX)/share/zsh/site-functions install: ... install -Dm644 "$(SRC_DIR)/_tss.zsh" "$(ZSH_FUNCTIONS_DIR)/_tss" # (tss is the name of my program) zsh postinstall.zsh "$(ZSH_FUNCTIONS_DIR)" ``` postinstall.zsh ``` ... local functions_dir=$1 if ! ((fpath[(Ie)$functions_dir])); then cat <>${(q-)ZDOTDIR:-$HOME}/.zshenv ### EOF fi ``` -- Johan