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 26111 invoked from network); 31 Mar 2021 09:50:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 31 Mar 2021 09:50:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: References:From:In-reply-to:cc:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1eVGzHZQCrBEEuurNkQCVb2UCrCUZIrxLOtF/0STj7A=; b=FTG5j2zPpxSw/CGWrFpdmGbSR/ IyEjvbYuDEzt0hffJnKyPiLmAX3DXdg+2WaTuREOkJuPd350ZdNTgGP2RxShu69Q43EscV+FrOaB+ 4DYVHbwkj5jThTvPs+vz/1uXEWsWUzgah/u7BLJJlH+S13iVEpSVU4tXBBvFCASJV43FN+8lsztiI lBgUMf7NlPVbBMnJcsr+wMdJBooLn0jQy/leaOQ69E1i/C0cB5YQsnJT2jgYDuepblL0WgfDoP5Qk qzuRS9ygGHhvh9K+f30k4J8Dn1U8Ik+ngqub8hTzdXG3R20mNmdj78xewCGnzTvr1MSSEh3T6RtQf bL+7VxqQ==; Received: from authenticated user by zero.zsh.org with local id 1lRXUz-000HsK-AB; Wed, 31 Mar 2021 09:50:53 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lRXUa-000HUq-Vl; Wed, 31 Mar 2021 09:50:29 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1lRXUa-000Drr-7y; Wed, 31 Mar 2021 11:50:28 +0200 cc: zsh-users@zsh.org In-reply-to: <20210331074548.b47tt6d2ekjrwdrs@jo-so.de> From: Oliver Kiddle References: <20201215125724.b6qdvvuhr2mwpxbz@jo-so.de> <1047872238.2253883.1608052325319@mail2.virginmedia.com> <20201215214027.a3htwtas6su3fhz5@jo-so.de> <43486-1617149414.412147@zBmo.ESTa.9XAh> <20210331074548.b47tt6d2ekjrwdrs@jo-so.de> To: =?utf-8?B?SsO2cmc=?= Sommer Subject: Re: How to get all tagets for rake completion? MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <53309.1617184228.1@hydra> Content-Transfer-Encoding: 8bit Date: Wed, 31 Mar 2021 11:50:28 +0200 Message-ID: <53310-1617184228.244862@cFeP.EmJg.7ARq> X-Seq: 26619 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: Archived-At: Jörg Sommer wrote: > It gives a much huger list and might contain many entries someone will never > use. But I don't know what's common. From my point of view I prefer more > than less. It's certainly arguable that completion matches should be comprehensive. But having fewer can be more useful. Perhaps consider including them by default and having a style to filter them. > Ah, okay. I must admit, I've never used zsytle queries before. I would make > this change, right? > > - zstyle -t ":completion:${curcontext}" all-targets && all=-A > + zstyle -t ":completion:${curcontext}:targets" all-targets && all=-A Exactly. > > As a general principle, it is better to use a style name that has a > > generic meaning. I can't find any existing style along the lines of an > > extra-matches, more-matches, allow-slow-generation etc so unless I've > > missed one you'd need to invent a suitable one. "all-targets" is too > > specific to targets. > > How about ‘verbose’? The existing `verbose` style is usually used to conditionally add descriptions to matches, especially where generating those descriptions is slow or where they're of questionable value. One existing style that adds additional matches is `use-ip` to add IP addresses with hostnames. I don't really like "use" here but `use-uncommented` would fit with that. There are a few that do the converse – disable matches. `ignore-line`, `ignore-parents`, `ignore-patterns`. An `ignore-uncommented` or `ignore-undescribed` would fit in with those. But the sense is the converse which may need different lookup code and perhaps implies the opposite default. That could even be implemented from _describe itself. Is rake -A giving you a fallback, e.g. "unknown" description for the extra targets or does the description remain blank? Oliver