Re: !(.pattern) can match . and .. if dotglob is enabled

2021-05-27 Thread Chet Ramey
On 5/26/21 7:36 PM, Nora Platiel wrote: Hello, This is behavior that changed more than ten years ago. I thought it changed in this commit: https://git.savannah.gnu.org/cgit/bash.git/commit/?id=ac50fbac377e32b98d2de396f016ea81e8ee9961 2014-02-26 -> 7.2 years ago That's the commit to the

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Andreas Schwab
On Mai 27 2021, Chet Ramey wrote: > You can argue that it's not clear enough that it allows multiple `!' > operators, Not from my reading of the description. It largely follows the POSIX gammar by only putting a single [!] into the pipeline syntax. Andreas. -- Andreas Schwab,

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Chet Ramey
On 5/27/21 11:43 AM, Andreas Schwab wrote: True, but bash accepts it. The manual doesn't document that extension, though. The bash manual documents the bash implementation. You can argue that it's not clear enough that it allows multiple `!' operators, but it does not say that it uses the

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Andreas Schwab
On Mai 27 2021, Alex fxmbsw7 Ratchev wrote: > why doesnt it accept ! after | Because either side of | cannot be a pipeline. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Andreas Schwab
On Mai 27 2021, Alex fxmbsw7 Ratchev wrote: > thought it would be useful, especially with PIPESTATUS You can always use a brace group. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Alex fxmbsw7 Ratchev
thought it would be useful, especially with PIPESTATUS On Thu, May 27, 2021, 17:49 Greg Wooledge wrote: > On Thu, May 27, 2021 at 05:46:41PM +0200, Alex fxmbsw7 Ratchev wrote: > > why doesnt it accept ! after | > > Because ! negates a pipeline, not a simple command inside a pipeline. > >

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Greg Wooledge
On Thu, May 27, 2021 at 05:46:41PM +0200, Alex fxmbsw7 Ratchev wrote: > why doesnt it accept ! after | Because ! negates a pipeline, not a simple command inside a pipeline.

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Alex fxmbsw7 Ratchev
why doesnt it accept ! after | On Thu, May 27, 2021, 17:38 Chet Ramey wrote: > On 5/27/21 11:20 AM, Andreas Schwab wrote: > > On Mai 27 2021, Chet Ramey wrote: > > > >> On 5/26/21 9:55 PM, Dale R. Worley wrote: > >> > $ ! ! [ 1 -eq 1 ]; echo $? > 0 > >>> That last one isn't

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Andreas Schwab
On Mai 27 2021, Chet Ramey wrote: > On 5/27/21 11:20 AM, Andreas Schwab wrote: >> On Mai 27 2021, Chet Ramey wrote: >> >>> On 5/26/21 9:55 PM, Dale R. Worley wrote: >>> > $ ! ! [ 1 -eq 1 ]; echo $? > 0 That last one isn't defined by the manual page. I'm surprised you don't

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Chet Ramey
On 5/27/21 11:20 AM, Andreas Schwab wrote: On Mai 27 2021, Chet Ramey wrote: On 5/26/21 9:55 PM, Dale R. Worley wrote: $ ! ! [ 1 -eq 1 ]; echo $? 0 That last one isn't defined by the manual page. I'm surprised you don't get a syntax error. It's clearly valid. According to the

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Andreas Schwab
On Mai 27 2021, Chet Ramey wrote: > On 5/26/21 9:55 PM, Dale R. Worley wrote: > >>>$ ! ! [ 1 -eq 1 ]; echo $? >>>0 >> That last one isn't defined by the manual page. I'm surprised you don't >> get a syntax error. > > It's clearly valid. According to the POSIX grammar, a pipeline can

Re: [patch #10070] toggle invert flag when reading `!'

2021-05-27 Thread Chet Ramey
On 5/26/21 9:55 PM, Dale R. Worley wrote: $ ! ! [ 1 -eq 1 ]; echo $? 0 That last one isn't defined by the manual page. I'm surprised you don't get a syntax error. It's clearly valid. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita