From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13744 invoked by alias); 27 Aug 2018 18:47:40 -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: 43343 Received: (qmail 4696 invoked by uid 1010); 27 Aug 2018 18:47:40 -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 1.137355 secs); 27 Aug 2018 18:47:40 -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=cc: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=Q8TbMw P+LBu2P5pRATe03o+Buz5L7Fx+zdYqR7jHdy0=; b=M2fZ52eC4SbfBzE60OJnWW R43NV6pl0znJJ3qxt5pWfxBro0zYAtv68Pt9MvRFhr0di48HnQCNLkyhHca7VAzX VzX7kvpsik3oy1Td9vuegfboHrzsFpaIqbPlJudV92jy/Z9xiOU2CG5OZtkFXEFY qvyfEpQGjXWUKE6IRzyUTtC9btAjI7Vc/w7ynY5vyjdKvgjoU5cMzZ6zWrAN5Rdm kdbDSRxv6529DeI9ENYnMQNg7niba6pPy9ejDD7n4+SPBQFMQhHimDAue1DTP0Kx SVLX019QovVZArl9qH7cok9tQHNcMZJ154pFnxVmCcYijw1xkoj8Tsg2tcN3Yqiw == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=Q8TbMw P+LBu2P5pRATe03o+Buz5L7Fx+zdYqR7jHdy0=; b=F2CCNFORznRvD85bwhHg1Z fj6U7xguHjDSOr57ZmiX/j4Po4snN3EiBMNOe+CTi20biQJYYIbvlCjsRM47EOzO V+FfN6+Uatsu2AY5YTGy4NXCFFEonuv4/oKeY7FOulmHcvjWU/KgTQ4e5hfAxxDw kC+OOssapsJks27yZq+XPgvb/iEvwEnkNzKRGISFtxSoLH1KRGospHPeB6DXn9Bg cxW3/SfK/TNphg7U1a4oiN3bB+qbemlDfla4q8m28pLg8KqfpcrzlY97eTwXVIYq jdvPbV9+WFeh0GpbrK/QAjL2W3cIOOGvME0KKKD16zZHl3z9D+6QKAkrdUpE2O7Q == X-ME-Proxy: X-ME-Sender: Message-Id: <1535395655.2206121.1487805120.6BC5EE06@webmail.messagingengine.com> From: Daniel Shahaf To: Bart Schaefer Cc: 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 References: <20180826105404.31846-1-danielsh@tarpaulin.shahaf.local2> <20180827010937.GA61934@CptOrmolo.darkstar> <1535364428.1254476.1487264352.6CB6A6E5@webmail.messagingengine.com> Subject: Re: [PATCH] _compdef: Use zsh/param instead of a glob. Date: Mon, 27 Aug 2018 18:47:35 +0000 In-Reply-To: Bart Schaefer wrote on Mon, 27 Aug 2018 11:22 -0700: > On Mon, Aug 27, 2018 at 3:07 AM, Daniel Shahaf w= rote: > > > > 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. >=20 > The ${(k)functions[(I)_*]} set will only differ from the > ${^fpath:/.}/_(|*[^~])(:t) set in two ways: > (1) The fpath search will find functions that have not yet been marked au= toload. > (2) After autoload functions have been invoked for the first time > ${(k)functions[(I)_*]} will have the additional functions from the > base files. >=20 > Skipping (1) for only (2) might be considered just as much a loss as > not including (2). I suppose we could do both. An fpath search could be expensive (it does I/O) but no one has complained so let's assume the cost is acceptable. > Also, ${(V)_comps} might be a more reasonable > source of the extra functions. >=20 I like this. That will filter out things in fpath that aren't completion functions, and will filter in things like =C2=ABcompdef 'compadd -a foo' ba= r=C2=BB. > > (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.) >=20 > Can't say anybody was really thinking about needing function > namespaces back then. Miinimize length of identifiers and maximize > similarity to the command for which the completion was being defined > were pretty much the only things in mind. Remember, this was pretty > close to the era when commands like "ls", "rm", "mv", "ld", etc. were > named. Would that also be why all the variables in the C code are named as the acronyms of whatever their names _should_ be? :-)