From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 94953ce1 for ; Wed, 10 Jul 2019 16:31:08 +0000 (UTC) Received: (qmail 22342 invoked by alias); 10 Jul 2019 16:31:00 -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: List-Unsubscribe: X-Seq: 24042 Received: (qmail 22620 invoked by uid 1010); 10 Jul 2019 16:31:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f49.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25503. spamassassin: 3.4.2. Clear:RC:0(209.85.166.49):SA:0(-0.7/5.0):. Processed in 3.475127 secs); 10 Jul 2019 16:31:00 -0000 X-Envelope-From: mikachu@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.166.49 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=trsX6sPdhNelq6yIARV0ZE0OL/rdhZxpIO6jNKZt74E=; b=IjrSkKWAnPwUHGH0oNmavYdAjvrGdaOL9WS5vUOOhPE+pWOmx8Ko9FgFuIMIhzdt2+ a8KOzVPa1HrKBzuL+bwZwOpqmmW8vU2V7fyXFT1DRzP9II5cqldXbFdgw0RguORih3st P+taWbUt5H8fNZ4cgLp0OHYfU2nBT4HBu2B4xxmwt+9WxfioCujR9Kt3noUrFDlai8n1 bh6acgzi0Xm0vsSeXpX9RtV8liQmpnzTkjW0AtjZ1BWFh/pEmcoIhAujYnNuE6GZ5wip WdiungJ8M8acJyicddsS3ArAzLU79I4btf8ACn+G+S4LA93CZvvN6CrEkoGoU/Gi4Xa+ YQPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=trsX6sPdhNelq6yIARV0ZE0OL/rdhZxpIO6jNKZt74E=; b=lOiQeWPkCMRp2UMTSWHlPajyN4SSOseHSYdmy7YppjJNCQk2/0ylB1ICqrgWnRO9ff vYHY1S8wGeQNfChTtLi4fUmNRfmaK1ajKr8YsdOErDZ3Da6v9KniBNf+RnCtsETgKgR5 +nt7GbCxbIJ7TLQNqA9uyDF3ypeHg9Fr/W3RINdVnMZlTmr1nuowIc0IN1dszMOoWVKS WQmB9+Z1qqvZl/5rPqiX1xtiUYlAQeOjAfMjXqUMmLzgUxYhzINcGp2SvudGCuW9zbx3 LO8qzZAFrIT5aaJ5Mx6Yj6ceA4PLCYGSQA6PTDOhZLM6jJOvEXvlVdKb9ELI2/NIo3E4 1+Wg== X-Gm-Message-State: APjAAAWodzcwkg8elKYlXNxMkDwkIM2Cd53KJIkYf3wJbAzfGWs1a1hR tUn2RNA5cxoWTsX9QhBxn0bDiURXW/Hrd3SZBHA= X-Google-Smtp-Source: APXvYqxKfaw8QGyM7SFZb+m3HCfTcNX1aevOCkm8dkjJPRjYTgvTBRdor9UZqx4ak+Eqh+4dYWlj/EA3kPk8cU6JCgQ= X-Received: by 2002:a02:b710:: with SMTP id g16mr35662304jam.88.1562776224578; Wed, 10 Jul 2019 09:30:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Mikael Magnusson Date: Wed, 10 Jul 2019 18:30:23 +0200 Message-ID: Subject: Re: In menu-select, how to make accept-line do not put a space To: Sebastian Gniazdowski Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" On 7/10/19, Sebastian Gniazdowski wrote: > Hello,I'm using the following setup: > > zstyle ':completion:*:*:*:default' menu yes select search > function double-accept { accept-line; accept-line; } > zle -N double-accept > bindkey -M menuselect ' ' double-accept > > It works fine, but it puts a space after pressing the space to accept > an entry. I would like it to not do it. How to accomplish this? This doesn't do what you think it does. "Note that the following always perform the same task within the menu selection map and cannot be replaced by user defined widgets, nor can the set of functions be extended" ..list of widgets.. "any other zle function not listed leaves menu selection and executes that function. It is possible to make widgets in the above list do the same by using the form of the widget with a `.' in front. For example, the widget `.accept-line' has the effect of leaving menu selection and accepting the entire command line." -- Mikael Magnusson