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

read -u 0 -k 1 does not work as advertised.



As illustrated below:

◼︎◼︎▶︎ which g1 g2                       

g1 () {

REPLY=timeout 

read -t 5 -k 1

echo REPLY=$REPLY

}

g2 () {

REPLY=timeout 

read -u 0 -t 5 -k 1

echo REPLY=$REPLY

}

◼︎◼︎▶︎ g1         # no return                          

aaREPLY=a

◼︎◼︎▶︎ g2                                   

asdf           # return

REPLY=a

◼︎◼︎▶︎ sdf                                

zsh: command not found: sdf



johnnonedoe@xxxxxxx


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