From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115 invoked by alias); 14 Sep 2016 16:38:57 -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: 21907 Received: (qmail 28503 invoked from network); 14 Sep 2016 16:38:57 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f51.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.220.51):SA:0(0.0/5.0):. Processed in 0.124232 secs); 14 Sep 2016 16:38:57 -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=T1z5wVAtyDEDmkgoLmQ22kXWCV7lrFf+MG+b6Ge/j0I=; b=T7HNXvP7C3jRbTMTHHJ8Q1+UIm0u6C6dZ2K97uL/L5NSUeVYct+K2rhZPmQcvaYZCd AxuNKOQv9ktJKiQyEOsAooL6OMUahIIODgBKZf5ZwbkoADs1b6Zeqcgd1dEdS0MtcVTq wn+uHH4UhAI9Q6W0QHSCkBcBd8+LKCu/oidGJQmHOHutkY9ggAnfCHwrP0sNSNau52h3 Dm7Lwj3zNAR81mu4VjQ4sh9Q/rT0CaBJc6rJJksN7syS/YVQ490j6retYzj4rsMNACqF tNDszzjuOuelwLdV/Kte4Rd3Shy2+e/RNYq6j+jp03Xm3PIMRxPjBAFb/iv98rPLKpaW FntQ== 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=T1z5wVAtyDEDmkgoLmQ22kXWCV7lrFf+MG+b6Ge/j0I=; b=P4IegYB7uFTDgOlikW96+KYd8tB22i28PAla60TbK+aEZz5j2caVxtv5xit7QO0vZe VBakrAwn7HceNLg5uJfXoq4STXsjmBXPrB4Mh86fL1fhSPYOZJOKRzYOrRRe8jWzXWBj 3Ft+qhjqW6SwQRNI0vDnBBS7zvc1UZcQ2832QFQ2nSJOP478ASsn4qyaxazEDdeHEUHu FoUutFSm1AGdzuiTyE6Uh9ypyEJywQN099xZHzzYJLY9lN/pykpmS88veeLnh6O8RI/X a1LWSbVn2oxm4bTHN+e1AHCdeXpMJxF8yQc3Np4h1+wZv5a8cnksEOq7BUn+G7LC7yu/ weUA== X-Gm-Message-State: AE9vXwMMNpJG4h6710e4k89dDIEs0Ydq6+FqA+DDV5UFdKzOTp/Zyp3aca1Hhyqmy4wzvQ== X-Received: by 10.66.241.65 with SMTP id wg1mr6036042pac.155.1473871132481; Wed, 14 Sep 2016 09:38:52 -0700 (PDT) From: Bart Schaefer Message-Id: <160914093903.ZM29711@torch.brasslantern.com> Date: Wed, 14 Sep 2016 09:39:03 -0700 In-Reply-To: Comments: In reply to Jesper Nygards "Re: Three questions about a completer" (Sep 14, 9:22am) References: <75335.1473713583@hydra.kiddle.eu> <160913195916.ZM30431@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, 9:22am, Jesper Nygards wrote: } } I am getting closer: the problem with numeric is now solved with your } suggestions, as well as turning off the listing of alternatives. However } I still have trouble reversing the menu completion direction. I think all you need is this: _list-result() { compadd -M 'l:|=* m:{[:lower:]}={[:upper:]}' -f ${__lsdir:-HOME}/* # Even if there are multiple matches, don't list them out compstate[list]='' # In case we are already in the middle of a menu completion, # ignore the compadd above and continue in the current menu compstate[insert]='menu' } It may be necessary in some edge cases to examine $compstate[insert] and update it differently; read the doc and experiment with what the state of $compstate[insert] is upon entry to _list-result.