zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: "Jörg Sommer" <joerg@jo-so.de>
Cc: zsh-users@zsh.org
Subject: Re: How to get all tagets for rake completion?
Date: Wed, 31 Mar 2021 11:50:28 +0200	[thread overview]
Message-ID: <53310-1617184228.244862@cFeP.EmJg.7ARq> (raw)
In-Reply-To: <20210331074548.b47tt6d2ekjrwdrs@jo-so.de>

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


  reply	other threads:[~2021-03-31  9:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 12:57 Jörg Sommer
2020-12-15 17:12 ` Peter Stephenson
2020-12-15 21:40   ` Jörg Sommer
2021-03-31  0:10     ` Oliver Kiddle
2021-03-31  7:45       ` Jörg Sommer
2021-03-31  9:50         ` Oliver Kiddle [this message]
2021-04-04  8:28           ` Jörg Sommer
2021-04-08 21:51             ` Oliver Kiddle
2021-04-12  8:07               ` Jörg Sommer
2021-04-25 16:34                 ` Lawrence Velázquez
2021-05-02 16:52                   ` Lawrence Velázquez
2021-05-09 17:32                     ` Lawrence Velázquez
2021-05-10 12:14                       ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53310-1617184228.244862@cFeP.EmJg.7ARq \
    --to=opk@zsh.org \
    --cc=joerg@jo-so.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).