From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27174 invoked by alias); 14 Sep 2017 12:52:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41703 Received: (qmail 8256 invoked by uid 1010); 14 Sep 2017 12:52:37 -0000 X-Qmail-Scanner-Diagnostics: from splintermail.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(34.212.71.225):SA:0(-1.4/5.0):. Processed in 2.546206 secs); 14 Sep 2017 12:52:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: ryan@splintermail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=splintermail.com; s=mail; t=1505393171; bh=m88Askz6Hb+44OxH1u7pHrOZAULhu39P8f5r5/Fe+rg=; h=Date:From:To:Subject:From; b=MGi97BEkOLvZbMf6kLODqwX5buP4sywmw6Etl/p0qwkm+ZwaKw8iHE1qNRe2/zFzJ 0aoXGRhC75haz+wbKKbOCZkrftaG7io785/J9AgiSsCCuz9vkwTdGpDIyVQzZATULK cYol2S9ByC3MMAhKl4CCFB8sP6nD3WxLj+6nUvVM= Date: Thu, 14 Sep 2017 07:46:10 -0500 From: ryan@splintermail.com To: zsh-workers@zsh.org Subject: Bug related to order of zsh completion options? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20170914124610.MBDRLsMZSBrKvJ-mpfzfvQuIMcCch9uxkeWvj0N8yJo@z> Hi zsh-workers, I found the solution for something which has been plaguing me for about half a day, and I think it is a bug. I can sum it up in this file: ----------- file "_brokencompletion" begins ------------ #compdef brokencompletion # first two versions work #_arguments '1:a:(( a_b_c\:"aabbcc" a_z\:"aaazzz" ))' #_arguments '1:a:( a_z a_b_c )' # this version doesn't #_arguments '1:a:(( a_z\:"aaazzz" a_b_c\:"aabbcc" ))' ----------- file "_brokencompletion" ends ------------ All of my tests can be repeated with a clean zsh shell: % zsh -f (new shell starts) % autoload compinit % fpath=(~/path/containing/_brokencompletion/ $fpath) % compinit When I use the one of the first two versions of _arguments in the file above, I see exactly the completion that I expect to see. When I use the third version of _arguments, I see the following: I type: brokencompletion I get: brokencompletion a_ ^ but my cursor is on the "a" If I change the order of possible matches in the parenthesis, it fixes the problem (first version of _arguments line). Also if I use the version which does not have descriptions for each command, I get normal behavior. Is this a bug or is this documented somewhere, and I just missed a specification? Thanks, Ryan