Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _compdef: Use zsh/param instead of a glob.
- X-seq: zsh-workers 43342
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] _compdef: Use zsh/param instead of a glob.
- Date: Mon, 27 Aug 2018 11:22:17 -0700
- Cc: Matthew Martin <phy1729@xxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ECYlyBzabUn5e0bsDb4U4Q0XQbfj1STH/xG15Z4cvsQ=; b=Kqn21ALZRGclmDV/S0/UrOduMNnrI1XP40ohGM/MgolbpHnwSzcPvrWtmo1TlHcpKq 2C/QJoAo5oSIn4Qvug2TW42oK+E7wbVYwRqvUbF4x7O3hE0euOhmm/9pPzCyHWpQ5w+3 u6KctOvts9NtUoUvUR7sZWhcZZ6x/iAw1Di2ZX29IqtMW6uVUCNMB0rTBpmk+2+lAmjl rkU01fF6iLuqnTl8rmmj369BcuzLrPHNVagv10xR7BFOJRdAEpmhy1v4V4VtmE38t0Z2 KhVxIqS/rPFkWIdko8PTKkTtuKsxuTSSzJNBCRxQmKhXSjl3osBMdoXBFRxQdgLtaGLD ydKw==
- In-reply-to: <1535364428.1254476.1487264352.6CB6A6E5@webmail.messagingengine.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20180826105404.31846-1-danielsh@tarpaulin.shahaf.local2> <20180827010937.GA61934@CptOrmolo.darkstar> <1535364428.1254476.1487264352.6CB6A6E5@webmail.messagingengine.com>
On Mon, Aug 27, 2018 at 3:07 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> 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.
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 autoload.
(2) After autoload functions have been invoked for the first time
${(k)functions[(I)_*]} will have the additional functions from the
base files.
Skipping (1) for only (2) might be considered just as much a loss as
not including (2). Also, ${(V)_comps} might be a more reasonable
source of the extra functions.
> (Incidentally, I never understood why completion functions didn't use a
> proper namespace, zshfoo_* or some such, like virtually everyone else —
> but that ship has sailed.)
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.
Aside: For going horribly overboard the other direction IMO, see:
https://github.com/aecolley/client_bash/blob/master/prometheus.bash
Messages sorted by:
Reverse Date,
Date,
Thread,
Author