zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: Oliver Kiddle <okiddle@yahoo.co.uk>, Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: completion match ordering
Date: Thu, 22 Aug 2019 10:39:52 +0200	[thread overview]
Message-ID: <ba7f9b90-9f9a-873d-f6a1-02b283d99191@gmail.com> (raw)
In-Reply-To: <93343-1557177371.866119@fZLB.yW79.IWgX>

Hi Oliver,

unfortunately this patch (Git commit cd6fd2b0a) breaks completion for
"git commit --fixup" for me, which then looks like this:

% git commit --fixup=
--fixup
 -- option --
















--fixup

-- stage all modified and deleted paths
-- allow recording an empty commit
...

I hope you can reproduce this, otherwise I'd have to investigate.


Best,
Daniel.

On 06.05.19 23:16, Oliver Kiddle wrote:

> I finally got around to finishing off the changes to the options for completion
> match ordering via compadd -o. Thanks to dana for reminding me about this.
>
> The argument to -o is now optional and can be abbreviated, e.g. -omat,rev
> The sort style also accepts values like "numeric" and documentation and
> tests have been added.
>
> _description, _all_labels etc all take -V, -1, -2 options and in the previous
> patch, I had added -o to that. However, as far as I can tell that only has any
> use in the case of -V because the functions need to decide whether to add -J
> group or -V group. So it was only needed because the interface conflates the
> use of -V - specifying the group name and making it unsorted. I guess -1 and -2
> were handled because it is common to combine them as -1V, -2J etc. Given that
> it'd be useless, I decided not to add it.
>
> Back when sort was added to _description in 18859, it was decided to have it
> explicitly ignore the style if -V was passed. While, I would tend towards the
> view that it is better to give users control anyway, it remains that way for
> now. You don't need to pass -V to _wanted as such. To allow the style to enable
> sorting, we would need to add a compadd -o value corresponding to normal sort
> order: perhaps `sort' or `lexical' (i.e. not numeric). We could then rely on
> compadd honouring only the first -o option passed to it.
>
> The combination nosort,reverse could perhaps preserve (but reverse) the
> original order.
>
> We could perhaps also add the backslash ignoring that dana recently restored as
> an option to -o. In my testing, that patch looks good by the way - thanks dana.
>
> Oliver
>
> diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description
> index 304c747a6..c2a0e080b 100644
> --- a/Completion/Base/Core/_description
> +++ b/Completion/Base/Core/_description
> @@ -1,13 +1,13 @@
>  #autoload
>

  parent reply	other threads:[~2019-08-22  8:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04  0:13 [PATCH] Completion: Sort lz4 compression levels properly (+ a question) dana
2018-11-07 10:35 ` Oliver Kiddle
2018-11-07 17:52   ` dana
2018-11-26  1:25   ` completion match ordering Oliver Kiddle
2018-11-26  3:09     ` Daniel Shahaf
2018-11-26  5:18       ` dana
2018-11-26  9:37     ` Peter Stephenson
2018-11-26 23:07     ` dana
2019-05-06 21:16     ` PATCH: " Oliver Kiddle
2019-05-07  0:10       ` dana
2019-05-07 12:39         ` Oliver Kiddle
2019-08-22  8:39       ` Daniel Hahler [this message]
2019-08-23 19:05         ` Oliver Kiddle
2019-08-25 14:25           ` Daniel Hahler

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=ba7f9b90-9f9a-873d-f6a1-02b283d99191@gmail.com \
    --to=genml+zsh-workers@thequod.de \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-workers@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).