From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7473 invoked from network); 8 Dec 1998 12:42:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 8 Dec 1998 12:42:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id HAA10569; Tue, 8 Dec 1998 07:39:08 -0500 (EST) Resent-Date: Tue, 8 Dec 1998 07:39:08 -0500 (EST) Sender: rz2a022@uni-hamburg.de Message-ID: <366D1DC2.2A726728@rrz.uni-hamburg.de> Date: Tue, 08 Dec 1998 13:38:26 +0100 From: Bernd Eggink Organization: RRZ Uni Hamburg X-Mailer: Mozilla 4.5 [en] (X11; I; AIX 4.2) X-Accept-Language: German, de, en MIME-Version: 1.0 To: zsh Workers Subject: typeahead problem Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"8r0ph2.0.4b2.itHRs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4711 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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@rrz.uni-hamburg.de http://www.rrz.uni-hamburg.de/eggink/BEggink.html