Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
typeahead problem
- X-seq: zsh-workers 4711
- From: Bernd Eggink <eggink@xxxxxxxxxxxxxx>
- To: zsh Workers <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: typeahead problem
- Date: Tue, 08 Dec 1998 13:38:26 +0100
- Organization: RRZ Uni Hamburg
- Sender: rz2a022@xxxxxxxxxxxxxx
A sticking 'y' key on my keyboard revealed a weird zle behaviour which I
first assumed to be a bug, but after glancing through the sources turned
out to be a feature. In a script I have to process a long list of items,
and for each item there is a statement like
read -q "REPLY?Yes or no: " && do_something
Now if "do_something" takes some time and you type at least one
character in advance, 'read -q' behaves as if you are constantly typing
'n', until you consume the pending character by a normal 'read'. In
other words, if you do NOT issue a normal read, EVERY following 'read
-q' will behave as if you had typed 'n', until the end of the script.
Is there a rationale for this feature (which I still consider a bug,
because it makes 'read -q' nearly unusable, at least in scripts)?
Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author