Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read -sq



On 2021-02-21 9:31 a.m., Bart Schaefer wrote:
Not really. As the doc for -q says, "Read only one character from the
terminal", but the arrow keys actually send more than one character.
In the case of down-arrow those are ESC, bracket, and B, so read
consumes and discards the ESC and then whatever comes after it gets
the bracket and the B.
Yeah, one keystroke is not the same as one character.  I wonder if you could
tell it to take whatever comes within an instant and treat that like one
character?  The ESC the braket and the B must come faster than anyone could
type, so clearly one keystroke, no?  Probably not worth the trouble I'll just
remind myself to hit the space for 'no'.






Messages sorted by: Reverse Date, Date, Thread, Author