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

'read -q -t X'




I'd like to use read with the -q and -toptions together, like so:

 read -q -t 10 '?Load Screen? (10 seconds, default Y) [Y/n] '

And have it read a y or n, but timeout the read if it's not answered in 10 seconds. I am doing this to have my login shells not always kick other ones off, as I use GNU screen for when I login from my phone, but not (usually) otherwise (and not always on the phone, sometimes I move it).

Is there a way to do this? It seems that combining -q and -t results in weirdness that ultimately doesn't work.

	--- Mike



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