From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11768 invoked from network); 8 Dec 1998 15:10:22 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 8 Dec 1998 15:10:22 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id KAA14988; Tue, 8 Dec 1998 10:08:53 -0500 (EST) Resent-Date: Tue, 8 Dec 1998 10:08:53 -0500 (EST) Sender: rz2a022@uni-hamburg.de Message-ID: <366D40E8.EAB05EE2@rrz.uni-hamburg.de> Date: Tue, 08 Dec 1998 16:08:24 +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: Re: typeahead problem References: <000a01be22b7$512aedc0$21c9ca95@mowp.siemens.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"lzXeD.0.7g3.54KRs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4715 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Andrej Borsenkow wrote: > > > > > In Linux and AIX 4.2 there is no difference in the behaviour whether or > > not I define CLOBBERS_TYPEAHEAD in config.h. Hm, is that the right > > location? I also added "x-*-linux*" to the switch in the "TYPEAHEAD > > KLUDGE" section in configure.in, but that didn't change anything either. > > > > Sorry, it is unrelated to typeahead probleam, I had to read better :( > > I tried it here with 3.1.5 + patches. It looks, like ZSH takes the first > character on the line and ignores the rest. > > while read -q && sleep 10 > do > echo YES > done > y <- cursor immediately springs to the next line > yyyYES > ^^^ output by ZSH > <- note newline > YES > > Only first 'y' from 'yyy' is taken. Is it what you've seen? No. For example, try this script: for i in {1..} do if read -q "REPLY?y/n: " then print yes else print no fi sleep 1 done After the first prompt, type aa quickly (or any other characters). On Linux and AIX, I get y/n: a no ay/n: n no ay/n: n no ay/n: n no ay/n: n no $ a where $ stands for the shell prompt. I guess the problem is getzlequery() in Zle/zle_utils.c. The comment says: "If there are any characters in the buffer, this is taken as a negative response, and no characters are read." This sounds like an exact description of what happens, and doesn't seem to make much sense. Why aren't the characters in the buffer read?? OTOH, there is no such bug on HP-UP, so I hesitate to hack the sources blindly... Bernd -- Bernd Eggink Regionales Rechenzentrum der Uni Hamburg eggink@rrz.uni-hamburg.de http://www.rrz.uni-hamburg.de/eggink/BEggink.html