zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: handle newer sort style in zstyle completion
Date: Sun, 07 Feb 2021 01:45:19 +0100	[thread overview]
Message-ID: <26573-1612658719.101666@EJFT.pXG0.Xcxv> (raw)

In looking over github issue #63 which pertains to the sort style, I
noticed that the zstyle completion for that still only offers true and
false. This updates it.

I merged that github issue minus the test case as that didn't quite make
sense to me given the style removal.

Oliver

diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle
index 75acde5f7..bb0e1f5bc 100644
--- a/Completion/Zsh/Command/_zstyle
+++ b/Completion/Zsh/Command/_zstyle
@@ -111,7 +111,7 @@ styles=(
   show-ambiguity	 c:
   show-completer	 c:bool
   single-ignored         c:single-ignored
-  sort			 c:bool
+  sort			 c:sort-order
   special-dirs		 c:sdirs
   squeeze-slashes	 c:bool
   stop			 c:stop
@@ -571,6 +571,10 @@ while (( $#state )); do
       _message -e separators 'separator string'
       ;;
 
+    (sort-order)
+      _wanted sort-orders expl 'sort order' compadd -F line - true false match nosort numeric reverse
+      ;;
+
     (max-matches-width)
       _message -e numbers 'maximum display width for matches'
       ;;


                 reply	other threads:[~2021-02-07  0:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=26573-1612658719.101666@EJFT.pXG0.Xcxv \
    --to=opk@zsh.org \
    --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).