From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10313 invoked by alias); 15 Sep 2016 06:28:55 -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: 21913 Received: (qmail 9629 invoked from network); 15 Sep 2016 06:28:55 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f180.google.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(209.85.192.180):SA:0(0.0/5.0):. Processed in 0.750404 secs); 15 Sep 2016 06:28:55 -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=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=FuPNdgfvvlYT/XuiVMLp8dn1XQv/OBhHMtpyBLZpJH0=; b=tgY1vtyLCYQmkDx9NrRqNrKnIk4TZpD5YzwPSir7gfwlKFLBCoJAd4JLPB1VWzt86l 2YccKiNvLmOApH5/KwlfMEDWbN6pWpShX2qH9iEZQef8kXeBAfL33/l38Y4Yw4OfG2/4 14Dg6NKxLbvtGe+LRXZkqotxFsF992MJZMntVwPz7XQ9ElhFYQwJwFYwP4q8s7UPq9C+ /FjTNM0WVHaE0EIo2qWjFSQfQZvs2k1qxImEXlQ0wTtiaOk69hNIGYKNUKbuFms5JgP7 SjYh6rZPql57bd+zreM9eTCau48Wh0bWHVuk/Sj1jq/w376xIh9DDXJH/Am+5L5EQlIO NJew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=FuPNdgfvvlYT/XuiVMLp8dn1XQv/OBhHMtpyBLZpJH0=; b=mFUm3zqEyglzi296So+FKZxk2hOMAH4yeRxE4s93P7G2nytHU6jtx3FCf6EGDt6sfX uZU2xDeN1cbF9szSTj4AGkFqGjZ6CCciPs4ngcF2dO3IXJqfLu2uJTByfIGgT7uajEBu 1gSdTttwWF7TcFubRAQPtsOoajaFU4l3ISXT4K9FLNy/qwMXIsMWXviJXSgEwCyDha2l gj+yzKz8I3u6cjpItQzuly950++sNq4SZmRP7PeytIXzVmdZpSv2NcrgsJT+61szRKHy 8ZjjOI8V/qNgJQcTaQoBelX9fRQMsiOPj86YtrADK6IRIRh6raFQHdkay3Vkzir+TPnq +Kkw== X-Gm-Message-State: AE9vXwMZgDgof2aadyTJAcpVleddvrjePmX1rbPfHJumBgxMbPww5883LyOmTMadZ725Mg== X-Received: by 10.98.149.82 with SMTP id p79mr11156290pfd.150.1473914951590; Wed, 14 Sep 2016 21:49:11 -0700 (PDT) From: Bart Schaefer Message-Id: <160914214924.ZM493@torch.brasslantern.com> Date: Wed, 14 Sep 2016 21:49:24 -0700 In-Reply-To: Comments: In reply to Jesper Nygards "Re: Three questions about a completer" (Sep 14, 10:32pm) References: <75335.1473713583@hydra.kiddle.eu> <160913195916.ZM30431@torch.brasslantern.com> <160914093903.ZM29711@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Three questions about a completer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 14, 10:32pm, Jesper Nygards wrote: } } Hmm, this was much harder than I thought. I see no difference with the } addition of the compstate[insert] line. Hm. I don't have any problem making what you posted in users/21901 switch forward to backward or backward to forward, even without the compstate[insert] assignment (as borne out by you finding it already set to "menu" on entry). I don't see where you've ever told us what version number of zsh you have ... oh. Date: Mon Mar 7 13:15:40 2016 +0100 38043: allow any completion widget to cycle matches for menu completion to fix reverse menu completion So it works for me because I'm running the most recent dev build. That means you'll have to do a bit of the work of preserving the menu: typeset -Hga __lsmatches _list-result () { if [[ $WIDGET != $LASTWIDGET ]] then if [[ $LASTWIDGET = *list-comp ]] then # Rotate stored completions to start in the right place # Replace (b) with (q) here if zsh complains about (b) integer here=$__lsmatches[(I)${(b)words[CURRENT]}] if ((here)); then __lsmatches=( $__lsmatches[here,-1] $__lsmatches[1,here-1] ) fi else # Store the matching completions in case needed again compadd -O __lsmatches \ -M 'l:|=* m:{[:lower:]}={[:upper:]}' -f ${__lsdir:-HOME}/* fi # Now add, preserving the order previously calculated compadd -V $WIDGET -U -f -a __lsmatches fi compstate[list]='' }