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

Re: set -F kills read -t



On 03/18/2014 04:12 PM, Jan Larres wrote:
On 19/03/14 11:08, Ray Andrews wrote:
As Peter said this is just normal non-blocking I/O, which is not at all shell-specific let alone zsh-specific. Since you clearly seem to want blocking I/O, why are you using the '-t' argument to begin with? If you just wrote 'read input' it should do exactly what you want. -Jan
Only because sometimes the input to the function is via arguments, not via pipe. I'm trying to emulate what (say) grep does:

ls *.txt | grep some_file

vs.

grep "grep" *

... and only the '-t' switch seems to work with both forms. Really 'read -t 1' seems perfectly functional, I just wonder about the arbitrariness of a time limit vs. a more robust situation, since in a pipe it seems to me that there is no doubt that input is expected. One should be able to insure that the flow of the
code is what one would expect without a 'dumb' pause, I'd say.



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