read -t

2015-01-04 Thread isabella parakiss
I'm trying to use read -t in an interactive shell read -t 3 *press random keys* Everything i press is now part of the next command in the prompt. It only happens when the delimiter is a \n. Is this intended? What's the point?

Re: read -t

2015-01-04 Thread Chet Ramey
On 1/4/15 12:45 AM, isabella parakiss wrote: > I'm trying to use read -t in an interactive shell > > read -t 3 *press random keys* > > Everything i press is now part of the next command in the prompt. > It only happens when the delimiter is a \n. > Is this intended? What's the point? It's diff

Re: read -t

2015-01-04 Thread isabella parakiss
Ok, that makes sense, but why doesn't it work if I change the delimiter? read -t 3 -d q *press random keys without pressing q* I think the same should happen here, I'm asking bash to read as much input as it can until it reads a q. Since I don't press q, whatever I typed should be used as

Re: read -t

2015-01-04 Thread Eduardo A . Bustamante López
I think the issue here is the inconsistent behavior of read -t when delim != '\n'. read -t 3 -d will *not* leave the input as typeahead. read -t 3 -d $'\n'will leave the input as typeahead. I tried playing with the 'unbuffered_read' variable in builtins/read.def (forcing it to be 1 even f

Re: read -t

2015-01-04 Thread Eduardo A . Bustamante López
Forgot to include mksh: | dualbus@hp ~ % mksh -c 'read -t 3' | afafafafafafa% | dualbus@hp ~ % afafafafafafa | zsh: command not found: afafafafafafa | dualbus@hp ~ % mksh -c 'read -t 3 -d d' | affafafafafafaf% | dualbus@hp ~ % affafafafafafaf | zsh: command not found: affafafafafafaf :-) 4 imple

Re: About the coprocess article of the Bash man page

2015-01-04 Thread 竹中 一博たけなか かずひろ
I'm sorry for late reply. I understand what the sentence means. Thank you. 2014-12-15 18:17 GMT+09:00 Eduardo A. Bustamante López : > Here 'terminated' is related to shell syntax, as in: 'the command line is > terminated by the & character' > > You can terminate commands with & ; \n ...