Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: In menu-select, how to make accept-line do not put a space
- X-seq: zsh-users 24042
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: In menu-select, how to make accept-line do not put a space
- Date: Wed, 10 Jul 2019 18:30:23 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <CAKc7PVBewq9Z7ZN5kn6fVVinQpaUTBFODzZUysB31WN5t1orbA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBewq9Z7ZN5kn6fVVinQpaUTBFODzZUysB31WN5t1orbA@mail.gmail.com>
On 7/10/19, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author