From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1010 invoked by alias); 15 Sep 2016 06:07:04 -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: 21912 Received: (qmail 19692 invoked from network); 15 Sep 2016 06:07:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf0-f42.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.215.42):SA:0(0.0/5.0):. Processed in 0.394683 secs); 15 Sep 2016 06:07:04 -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=FREEMAIL_FROM,HTML_MESSAGE, SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: jesper.nygards@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.215.42 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=A8cRikl1ySR/YBqCtn05jmvXKMwgBVFToWSRA4RiNbQ=; b=PhHcZtlRnEPz8jlx+/ZdqopZyTqQbFoH/rqBxTIawhokuXQq49jfMVR/pX/LNCPlfi PpjQVJdPjLk9iwYSnRgRO5fAX43YETfgmb3P+VWs09fambibe/yJaeXcw7mfBCEYzAYN ssQ74cDTI/4wwE10ZqamMJIYf14U9Mn3nqtj4KRG0TxIvCaXJFYpMcWrl0iaDKg/W5tF zYTo2DxE+brPjYPssvjv7B20oymkJZ/Y9AVCQTWUsrYHj4EkOqgzabUifb3n64YRVW04 cG8CMCN9miUse3enlrx/kidhVuq1eqTijxKhbQmd+VY1AUBUE9yZ43HuoHdhF6XMXrtv LSYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=A8cRikl1ySR/YBqCtn05jmvXKMwgBVFToWSRA4RiNbQ=; b=TwZFuob0Dom6ZUWrr3JPAOi1wFV9zoC7sL10jEsu37I938pi1Cc3bKHFtgFrhtu+Pz NDYSxpa/NlyA57MH3Vdr5ZPfOqypRFyRhPzq8XcR0Cr1hrlIITLVc0jdt+w6/Be3GKuN GJ+VynbVFtcV9eU+Nx58bJqzn5hHyk/m8V1X4ZiKd6J3S0M9mnyRTx8rjn2x3vBLqZXw oAudNGLiiLFBHZhpXXKkaH7/qTvfV8gDh6J4aIieRmejSW9w1pLVlbRgSLMv9LzrnF7S G840+O5BHNze4ftvDi8O5hB2BSMgNa7TCcm+bwYy4LrBGu+9OUKv/guWuMVGJV5ep5T3 eQrQ== X-Gm-Message-State: AE9vXwNQuFTaeRGcwpH7n/UPhQnySVX1aUVBH3+KZ2GRLYElSCK/mMz+P8UmWcQP1HJ2lCDxIJjo6pqHQvoZcw== X-Received: by 10.25.166.2 with SMTP id p2mr2468582lfe.134.1473919263395; Wed, 14 Sep 2016 23:01:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <75335.1473713583@hydra.kiddle.eu> <160913195916.ZM30431@torch.brasslantern.com> <160914093903.ZM29711@torch.brasslantern.com> From: =?UTF-8?Q?Jesper_Nyg=C3=A5rds?= Date: Thu, 15 Sep 2016 08:01:02 +0200 Message-ID: Subject: Re: Three questions about a completer To: Zsh Users Content-Type: multipart/alternative; boundary=001a11411d661f61ba053c85922a --001a11411d661f61ba053c85922a Content-Type: text/plain; charset=UTF-8 I realize my knowledge of how the completion system works in its internals is too limited, I can't really interpret what's going on. I have simplified the code to the one below (for now removing the fix for taking care of $NUMERIC, to make sure it isn't a source of the problem): This is my whole ~/.zshrc: autoload -U compinit compinit zle -C list-comp menu-complete _generic zle -C rev-list-comp reverse-menu-complete _generic bindkey '\ee' list-comp bindkey '\eE' rev-list-comp _list-result() { print "state: " $compstate[insert] compadd -M 'l:|=* m:{[:lower:]}={[:upper:]}' -f $HOME/* compstate[list]='' compstate[insert]='menu' } zstyle ':completion:*list-comp::::' completer _list-result If I type "print ", I can see "state: menu" being printed once, and further presses of "" does not redisplay it. So I assume the possible matches is used by the menu-completion and not re-generated. However, once I change direction with "", the message is printed every time I press "". So it's like the completion system doesn't recognize that list-comp and rev-list-comp are part of the same solution, and _list-result is called to start the generation of matches again. And since there's already an alternative on the command line, nothing else matches. --001a11411d661f61ba053c85922a--