Re: Bug in extended pattern matching *!()

2012-09-28 Thread DJ Mills
On Fri, Sep 28, 2012 at 12:52 AM, wrote: > [OT] Thanks for your work for the Bash project. I've just learned that you've > been the main maintainer for a long time, so keep it up! :) +1000 to that, bash makes my life so much easier and I doubt you get enough thanks

Re: Bug in extended pattern matching *!()

2012-09-28 Thread Chet Ramey
On 9/28/12 12:52 AM, hans1wo...@gmail.com wrote: >> The question is whether or not !(x) should match the empty string. The >> bash matcher treats it similarly to [!x], which does not. > > It does however match the empty string at most times. So I guess that's the > real bug. Again, there is some

Re: Bug in extended pattern matching *!()

2012-09-27 Thread hans1worst
> $ echo a*!(x) # does not > ba Sorry, that should of course be $ echo a*!(x) # does not ab

Re: Bug in extended pattern matching *!()

2012-09-27 Thread hans1worst
> The question is whether or not !(x) should match the empty string. The > bash matcher treats it similarly to [!x], which does not. It does however match the empty string at most times. So I guess that's the real bug. Again, there is some inconsistency in $ echo *!(x)a # does match empty string

Re: Bug in extended pattern matching *!()

2012-09-27 Thread Chet Ramey
On 9/26/12 10:07 PM, hans1wo...@gmail.com wrote: > See also this thread: http://stackoverflow.com/questions/12596468/ > > It looks like there is some bug in the pattern matcher > > $ shopt -s extglob > $ touch a ab ba > $ echo a*!(x) > > Expected result: > a ab > Experienced result: > ab The qu