zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Thomas Lauer <thomas.lauer@virgin.net>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: completion, sorting of options
Date: Sat, 4 Nov 2023 16:49:25 +0100	[thread overview]
Message-ID: <CAHYJk3SxgK_4MOFCXr76bBfGtbiOvT9mPKhJ3SNyTOgMuMJ11A@mail.gmail.com> (raw)
In-Reply-To: <3focki1mdsq59ji5d0u5nb7qenu6u8brkt@tlc.com>

On 11/4/23, Thomas Lauer <thomas.lauer@virgin.net> wrote:
> So I'm writing my first completion file (gory thing, just the right
> thing for a rainy Sat afternoon). The completion file itself is more or
> less working, but I've run into trouble with the options display after
> "-<TAB>".
>
> Basically what I want to achieve is that the options are listed in
> precisely the order given in the completion file (there are many options
> and some are much more probable to be used than others, so I want these
> at the top (I know that further typing will limit the shown completions
> but not all people using this will be up to that... a simple up/down
> might work better for some)).

If you give -V foo it will create an unsorted group, but it is a bit
unconventional to do this for sorting regular options by usage. You
could also consider adding the common options with a -J common and the
other ones with a -J rare, or something to that effect.

-- 
Mikael Magnusson


  reply	other threads:[~2023-11-04 15:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-04 15:42 Thomas Lauer
2023-11-04 15:49 ` Mikael Magnusson [this message]
2023-11-05 15:02   ` Thomas Lauer
2023-11-05 15:58     ` Bart Schaefer
2023-11-05 16:58       ` Thomas Lauer
2023-11-08 13:24 ` Thomas Lauer
2023-11-08 20:09   ` Bart Schaefer
2023-11-08 20:44     ` Ray Andrews
2023-11-08 21:34       ` Bart Schaefer
2023-11-08 22:41         ` Ray Andrews
2023-11-09 13:32     ` Thomas Lauer
2023-11-09 18:07       ` Bart Schaefer
2023-11-10 14:04         ` Thomas Lauer
2023-11-10 15:09           ` Ray Andrews
2023-11-10 17:15           ` Bart Schaefer

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=CAHYJk3SxgK_4MOFCXr76bBfGtbiOvT9mPKhJ3SNyTOgMuMJ11A@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=thomas.lauer@virgin.net \
    --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).