zsh-autocomplete icon indicating copy to clipboard operation
zsh-autocomplete copied to clipboard

Get out from history menu without selecting anything

Open Arrow-x opened this issue 2 years ago • 3 comments

What do you want?

When you are in history mode you have to select something, I want to hit Ctrl C to get out of the menu. image

Why do you want this?

the completion menu already has that feature, and I want to change my mind

Who else would benefit from this?

anybody who was looking for something, didn't find it or changed their mind and want to quit

How should it work?

a keybind that make get out of the menu and back to editing your line

Arrow-x avatar Jun 15 '22 18:06 Arrow-x

ESC works for me for this

baudneo avatar Jun 15 '22 20:06 baudneo

@baudneo it does nothing for me.

Arrow-x avatar Jun 15 '22 21:06 Arrow-x

Thanks for the suggestion. I will add this.

In the meantime, just add this to your .zshrc file:

bindkey -M menuselect '^_' .undo

You will then be able to press Ctrl- or Ctrl/ (depending on your terminal) in the history or completion menu to undo the last item your inserted into the command line.

marlonrichert avatar Jun 17 '22 07:06 marlonrichert

@Arrow-x It's now implemented.

PS: If you enjoy using my software, please consider sponsoring me. 🙂

marlonrichert avatar Aug 17 '22 14:08 marlonrichert