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

read -t



In an old mail from Bart Schaefer:

[...]
# Output the SEND sequence and read back into RECV.  In case this is
# not a terminal that understands SEND, do a non-blocking read and
# retry for at most WAIT seconds before giving up.  Requires 3.1.9.
# For 3.0.x, remove "-t" but don't call this on the wrong terminal!

print -nP $SEND

integer N=$SECONDS
while [[ $REPLY != R ]] && ((SECONDS - N <= WAIT))
do
    read -t -k 1 && ((N=SECONDS))
    RECV=$RECV$REPLY
done
[...]

But the -t option doesn't exist here, with zsh 3.1.9.
Where's the problem?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / PolKA research team at LORIA



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