From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21954 invoked by alias); 27 Aug 2018 10:07:17 -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: 43336 Received: (qmail 11514 invoked by uid 1010); 27 Aug 2018 10:07:17 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 2.188596 secs); 27 Aug 2018 10:07:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/6GqSQ ENWgaL1xDzXygEshWrS5Co95RQbSOXlCoDSro=; b=iGKe2euVCSf7IbNiqsvWgu jR388h2LvOQk++WncVCxaTTR/82pC5f2A+YPpY7kuDJtOXndllJjfvpq4Woa3YtQ IzAUbogEOBmeleD6bkUmp18JuXkJhzGOe2vLKB1b/umJJV6F6nvKLYBXj1EUUT3M /9GUYd/mYbv3j4vxAyyzMTgzdd4VUDI4ub04nGu1BtmOEalbl/jMhslYh2I989hv GK3Z/CUnBQ56EEtLWrnxzu5yrKZY0pl24UlAz8J40vMA7jaCTh1KAchzoQRDahbE wONQVo+wPKtXuX7igiDTHFhncdRBi1e+4/5wDpLUdOnNsHw1g5cOayR4xly4SzNQ == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=/6GqSQ ENWgaL1xDzXygEshWrS5Co95RQbSOXlCoDSro=; b=jbqnyPNWdn60o09Gl07uxJ IEBrNf9oz5GH4shKkRqEfT8Ap+mc5jkGkp7+eHZ0xah4Er9z1Sd/zSwxdpCwjGrH poqzqxkPGdcqV1McptaCiZllr7Ai569Gf62S2dSbCRN/uF6Dr7VWtPEIHpOnTOP2 Ls+jEcu6a4Ut19MktjbSxZdw/iQ3ph4zU7nNk8+YP0ukRzNnowiWivpGgWNenPfW i5l9wmXe6xrF89RV7U87SxtoNa23dr7eCAFfIrf0Lcnou+26Zf+HHXsUochDEQ3y ZNJyZOfsu3EqSZ1PjIH8E4U1UbUrvJjPqVdwAle7uowy4avfzwFSNsmyIYqewTQg == X-ME-Proxy: X-ME-Sender: Message-Id: <1535364428.1254476.1487264352.6CB6A6E5@webmail.messagingengine.com> From: Daniel Shahaf To: Matthew Martin , zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-7b72137a In-Reply-To: <20180827010937.GA61934@CptOrmolo.darkstar> References: <20180826105404.31846-1-danielsh@tarpaulin.shahaf.local2> <20180827010937.GA61934@CptOrmolo.darkstar> Date: Mon, 27 Aug 2018 10:07:08 +0000 Subject: Re: [PATCH] _compdef: Use zsh/param instead of a glob. Matthew Martin wrote on Sun, 26 Aug 2018 20:09 -0500: > On Sun, Aug 26, 2018 at 10:54:04AM +0000, Daniel Shahaf wrote: > > In particular, this allows functions defined inside another file to be > > offered, such as various __git_foo() helpers defined in ${^fpath}/_git. >=20 > I don't think this is a good idea at present. While the completion > system does use the _ prefix namespace, I don't see anything in the > documentation reserving the namespace to the completion system. There > are already a number of projects[0] that use the _* namespace. In general, it is better to offer too many completions than too few. (In other words, better to have false positives than false negatives.) For example, the other day I needed __git_branches; I didn't particularly mind to have the entire timestamp-named z-sy-h cast there since it didn't get in the way, due to namespacing. That said, if there is some way to generate a set of names that is less complete but has fewer false positives, we could offer that set under one tag and the ${(k)functions[(I)_*]} set under another tag, to allow users to get their preferred way by setting the tag-order style. > Perhaps in 5.6 document that only completion functions should start > with an underscore and then apply this patch for 5.7 so that users > have time to adapt. I don't know if we should deprecate user functions being named `_*`. We could point out in the docs that the completion system uses this namespace so the world would be a _slightly_ better place if user code used some other namespace, but I would stop short of making this a hard requirement. (Incidentally, I never understood why completion functions didn't use a proper namespace, zshfoo_* or some such, like virtually everyone else =E2= =80=94 but that ship has sailed.) Cheers, Daniel (except gettext)