read -t0 may report that input is available where none is possible

2021-11-20 Thread Mark March
true | { sleep 1 ; read -rt0 ; echo $?; } outputs 0. There can clearly be no data on the stdin of the second process in the pipeline. bash(1) has this to say about read -t: "If timeout is 0, readĀ  returnsĀ  immediately, without trying to read any data. The exit status is 0 if input is availabl

Re: Strange complete -C output

2021-11-20 Thread Dominique Martinet
Emily Seville wrote on Sun, Nov 21, 2021 at 01:40:08PM +1000: > Bash version: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) > OS version: Linux Mint 20.2 Cinnamon > > Hello! Why when I create *complete -C 'echo -e "aa\nab\n"' : *completion and > try use it I obtain additional garbage i

Strange complete -C output

2021-11-20 Thread Emily Seville
Bash version: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) OS version: Linux Mint 20.2 Cinnamon Hello! Why when I create *complete -C 'echo -e "aa\nab\n"' : *completion and try use it I obtain additional garbage in output instead of only *ab ab* hints?

Re: Unclosed quotes on heredoc mode

2021-11-20 Thread Robert Elz
Date:Sat, 20 Nov 2021 15:19:33 -0500 From:Chet Ramey Message-ID: | Right. Purposeful. There's a difference between done intentionally for pragmatic reasons, and done intentionally because it is the right thing to do and people should depend upon it remaining that

Re: Unclosed quotes on heredoc mode

2021-11-20 Thread Chet Ramey
On 11/20/21 12:35 PM, Robert Elz wrote: Date:Sat, 20 Nov 2021 11:33:37 -0500 From:Chet Ramey Message-ID: <4addb789-50b6-12a5-7b8a-8a082abaa...@case.edu> | I'm skeptical, but willing to be convinced. Bourne's shell allowed EOF to | terminate all sorts of thi

Re: Unclosed quotes on heredoc mode

2021-11-20 Thread Robert Elz
Date:Sat, 20 Nov 2021 11:33:37 -0500 From:Chet Ramey Message-ID: <4addb789-50b6-12a5-7b8a-8a082abaa...@case.edu> | I'm skeptical, but willing to be convinced. Bourne's shell allowed EOF to | terminate all sorts of things (quoted strings, command substitutions, her

Re: Unclosed quotes on heredoc mode

2021-11-20 Thread Chet Ramey
On 11/19/21 9:18 AM, Robert Elz wrote: illusory compat issues. I have no idea what inspired this initially, but my guess would be a code bug no-one noticed. I'm skeptical, but willing to be convinced. Bourne's shell allowed EOF to terminate all sorts of things (quoted strings, command substit