Replies: 8 comments 7 replies
-
Use the
Use the
That would have a lot of unwanted, undesirable side effects.
That's not possible. Zsh does not let you change the behavior of Note that all of this is handled by the Zsh Line Editor, and not by |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response, and sorry for my inexperience with this. Even though ^C is not customizable, the default behaviour of returning to the prompt is quite close to my desired behaviour - it just has some annoyances. On some long completions, the following happens: https://asciinema.org/a/jC2yE5OaQ0hURvxU9QywhMVpI This is going:
I found #142, but I imagine it is unrelated. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Yep, that works well, thanks. I guess I just think that ^C should be usable for its expected purpose, and not completely unusable when using this plugin. If this is not possible for you to fix, I understand. Thanks |
Beta Was this translation helpful? Give feedback.
-
That works well! Now, CTRL-C will kill the line first try. It is nice to see the menu selection, however... |
Beta Was this translation helpful? Give feedback.
-
Actually, it seems like the issue still happens with |
Beta Was this translation helpful? Give feedback.
-
I have configured down to |
Beta Was this translation helpful? Give feedback.
-
I'm super confused. My .zshrc is currently zstyle ':autocomplete:*' min-input 4
zstyle ':autocomplete:tab:*' insert-unambiguous yes
zstyle ':autocomplete:tab:*' widget-style menu-select
zstyle ':autocomplete:*:too-many-matches' message ''
source /home/theol/.oh-my-zsh/custom/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh
source /home/theol/.oh-my-zsh/custom/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh When I open a new zsh shell, I can reproduce the issue (sudo tab tab ^C).
However, the thing that really confuses me is that when I follow your above steps:
The problem does not happen at all. There must be some caching going on, but I can't figure out where. I've tried deleting zcompdump and ~/.cache/zsh to no avail. |
Beta Was this translation helpful? Give feedback.
-
Regardless, commenting out the function at that line is a workaround for the problem. Now, everything works quite well.
However, there is just one last bug. If I type something that takes some time to query completions, and then instantly press ^C, I can occasionally cause it to print:
This is what I meant in the OP by "(Occasional) If some running query needs to abort (prints an error)". This does not happen with a custom send-break binding. I don't know if this is something that is fixable, but it is the last thing preventing me from being able to use ^C. |
Beta Was this translation helpful? Give feedback.
-
What do you want?
When editing on the command line, I sometimes want to:
My desired bindings for this are:
Currently, CTRL-C takes 1-4 presses to clear the prompt:
Coincidentally, other than item 1 and 2, which are bugs, that behaviour is what I am looking for to map Esc to (exit selector and return to untouched input).
Currently, Esc does nothing (and seems to add to the number of CTRL-C required to clear), and CTRL-C is a bad experience.
I'm not sure if this is something I can implement in my config, as I don't really know how to work with zsh bindings, but I feel like this might need to be something that is added to the plugin.
Thanks a lot for this awesome tool!
Beta Was this translation helpful? Give feedback.
All reactions