[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in extended pattern matching *!()

From: hans1worst
Subject: Bug in extended pattern matching *!()
Date: Wed, 26 Sep 2012 19:07:23 -0700 (PDT)
User-agent: G2/1.0

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:

This is particularly weird since other combinations work fine:
$ echo *!(x)a
a ba
$ echo !(x)*a
a ba
$ echo a!(x)*
a ab

I assume it has something to do with the EXTMATCH implementation in 
lib/glob/sm_loop.c, but I haven't been able to figure out what exactly the 
problem is. Not sure if I fully understand the idea behind the for-loops there.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]