According to `man 1 zshmodules`:
> send-break
> leaves menu selection and restores the previous contents of the
> command line
>
> [...] For example, to make the return key leave
> menu selection without accepting the match currently selected one could
> call
> bindkey -M menuselect '^M' send-break
>
> after loading the zsh/complist module.
However, while using send-break during menu selection does exit the
completion menu, it does _not_ restore the previous contents of the
command line and in fact leaves the current selection in place.
On 16 Aug, Marlon Richert wrote: > According to `man 1 zshmodules`: > > > send-break > > leaves menu selection and restores the previous contents of the > > command line > However, while using send-break during menu selection does exit the > completion menu, it does _not_ restore the previous contents of the > command line and in fact leaves the current selection in place. In my testing, both with my setup and starting from zsh -f, it does behave as documented. Are you able to bisect your setup to find a cause or provide a list of commands to reproduce it starting from a blank setup? Oliver
On Thu, Aug 26, 2021 at 1:29 PM Oliver Kiddle <opk@zsh.org> wrote:
>
> On 16 Aug, Marlon Richert wrote:
> > According to `man 1 zshmodules`:
> >
> > > send-break
> > > leaves menu selection and restores the previous contents of the
> > > command line
>
> > However, while using send-break during menu selection does exit the
> > completion menu, it does _not_ restore the previous contents of the
> > command line and in fact leaves the current selection in place.
>
> In my testing, both with my setup and starting from zsh -f, it does
> behave as documented. Are you able to bisect your setup to find a cause
> or provide a list of commands to reproduce it starting from a blank
> setup?
I can reproduce my case with the current master branch in a clean environment:
% exec -c zsh -fc "TERM=$TERM PS1='%# ' exec Src/zsh -f"
% zmodload zsh/complist
% autoload compinit
% compinit
% bindkey -M menuselect '^M' send-break
% bindkey '^I' menu-select
% cd /<Tab><Enter>
% cd /bin/
After pressing Tab and then Enter, `cd /bin/` is left on the command
line, instead of `cd /`. The same happens if I press Tab and then
Ctrl-G.