Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Help find Zsh' Bash `read -N1 -p "Put here " var
On Tue, Aug 22, 2023 at 10:42 AM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
>
> - in bash, read -N1 still does backslash processing
Compare "read -n1" (which you did reference in your later examples).
> - read -k reads from the terminal device regardless of where stdin
This can be changed by e.g. "read -k 1 -u 0" (or other descriptor number).
> In any case, both read a *character*, not necessarily a *byte*
> and despite the "k", not necessarily all the characters that are
> sent upon a key or key combination.
If one wants to read full key combinations from within a ZLE widget,
one should use "zle read-command" instead.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author