From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16953 invoked by alias); 30 Apr 2016 12:50:51 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21508 Received: (qmail 18876 invoked from network); 30 Apr 2016 12:50:47 -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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: how to revert tab completion order in _arguments or _describe To: Daniel Shahaf References: <572375FD.80200__31649.435326881$1461944191$gmane$org@mathphys.fsk.uni-heidelberg.de> <20160430004638.GA30740@tarsus.local2> Cc: Zsh Users From: Paul Seyfert Message-ID: <5724A306.3000103@mathphys.fsk.uni-heidelberg.de> Date: Sat, 30 Apr 2016 14:20:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160430004638.GA30740@tarsus.local2> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 30.04.2016 02:46, Daniel Shahaf wrote: > Paul Seyfert wrote on Fri, Apr 29, 2016 at 16:55:57 +0200: >> One drawback though is that I'm usually most interested in the latest >> version number but the menu completion starts with the oldest version >> number (i think it's alphabetically ordered). Is there a way to tell the >> _describe in the (listversions) state to cycle through the options in a >> specific order? (actually i'm not bound to stick to _describe there, any >> other function would be fine, too) > > Yes. The option to show completions in the order given is either -J or > -V (I don't remember which); both of them are documented under the > 'compadd' builtin. > Thanks for the pointer, -V keeps the original order (and then I realised that the original list wasn't fully sorted so I added a `sort -r` to the pipe) https://github.com/pseyfert/lb-zsh/commit/8e77312b6e69eb53acf4d6035a77e3ef3420f38b