◼︎◼︎▶︎ which g1 g2
g1 () {
REPLY=timeout
read -t 5 -k 1
echo REPLY=$REPLY
}
g2 () {
read -u 0 -t 5 -k 1
◼︎◼︎▶︎ g1 # no return
aaREPLY=a
◼︎◼︎▶︎ g2
asdf # return
REPLY=a
◼︎◼︎▶︎ sdf
zsh: command not found: sdf