On Mon, 6 Oct 2025 15:04:41 -0400, Chet Ramey wrote:
> The idea is that these should be the same conditions under which the read
> builtin puts the terminal into character-at-a-time mode.
> 
> > +      ct = (nflag || delim) && isatty (fd);
> So this line should read
> 
>         ct = (nflag || delim != '\n') && isatty (fd);

So, I changed that line like you said, and now it is all working!

I am happy!  This thing has been bugging me for years!

(Well, it is working on Linux. On Cygwin, for some reason, it still fails to 
detect keystrokes that have been typed in but not yet followed by RETURN key.
But I will try to chase that problem some other time.)

Now, if only we had a way to say:  read -d "" --noblock

Thanks again!



Reply via email to