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 4685 invoked from network); 7 Feb 2021 00:45:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Feb 2021 00:45:39 -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-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=N0C/UslPVaTJOgYsKM1NS5Nh1lf0UCCA1RpCjyJx4Pw=; b=sb+bb7ZtPYfkLRR4pPy6ZEPuBa 8Rrou0sUxCPZrVwnxONDUHKn+hFGrTKw2/YJ/yHzDSMv1Me2JWF1PT/QVe3X5TKqS9NqECpA+EHdy w90sKiNJ8SwC9fG7GMtlmKmcB5Y0Z7eoRHiNghEQdU6RidEgnscZVDWRYvHrJf0d2u+P1lnPatcWJ OgFqMlgnLfU51CvgeuVduPAqC6DiwSUmEd70FxPDdqZGCLavaVO09t/eAzkWxpMF33gYTJJR36Ih0 7wqksYlZIiLdlWOntxu8xSwILVKrsYVLlPD2g9EZrpRV05oHmDyZK//TXdlLdF+XV+Rm+RMIz8Jjd Cjtd5D4Q==; Received: from authenticated user by zero.zsh.org with local id 1l8YCn-0005Qu-O4; Sun, 07 Feb 2021 00:45:37 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1l8YCY-0005I7-KO; Sun, 07 Feb 2021 00:45:22 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1l8YCV-0006uc-3N for zsh-workers@zsh.org; Sun, 07 Feb 2021 01:45:20 +0100 From: Oliver Kiddle To: Zsh workers Subject: PATCH: handle newer sort style in zstyle completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26572.1612658719.1@hydra> Date: Sun, 07 Feb 2021 01:45:19 +0100 Message-ID: <26573-1612658719.101666@EJFT.pXG0.Xcxv> X-Seq: 47929 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: 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' ;;