I want to read normal text input (a.k.a. not the regular ZSH editor that might have auto-completion etc.) from inside a ZLE widget. Currently when I try:
function myfunc() {
echo -n "Your name: "
read -re
echo $REPLY
}
zle -N mywidget myfunc
bindkey "\C-k" mywidget
When I call myfunc, everything goes as expected but when I press C-k (binded to the keystroke through bindkey above) it's like the read command is skipped:
I haven't pressed enter, just C-k one time.
What I want is to have bash-like functionality and wait for my input.
I'm aware of zsh read input in zle widget but I don't want to use ZSH's minibuffer editor as it has autocompletion etc. and this Better way to read a line of user input in zsh? (e.g. with zle?) solution didn't work for me
