[PATCH] xfree86: Allow InputClass entries to specify match type
Dan Nicholson
dbn.lists at gmail.com
Mon Dec 6 05:47:02 PST 2010
On Sun, Dec 5, 2010 at 9:29 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Thu, Dec 02, 2010 at 06:19:15AM -0800, Dan Nicholson wrote:
>> The InputClass Match* entries are currently hardwired to offer a certain
>> variant of comparison for matching. For example, the MatchProduct entry
>> uses substring match. Add a second optional argument to the entry to
>> allow the match type to be specified.
>>
>> MatchProduct "foo*" "pattern"
>>
>> The available match types are "string", "istring", "substring",
>> "isubstring", "path" and "pattern". See xorg.conf(5) for more details.
>> If no type is supplied, the previous default is used.
>
> I wonder if it is possible to support sed- or grep-like matching instead of
> adding match types like this?
>
> something like?
> MatchProduct "s/pattern/i"
Thanks for taking a look at this.
That would work, but it wouldn't offer the same flexibility. You'd
basically get the default or an unusual regex. I personally think it's
cleaner to specify the type (if you want), but I realize this is sort
stretching it as a feature.
One of the things I intended to do was add a regex matcher. E.g.,
MatchProduct "TheMouse[123]" "regex"
I can work on that now if it makes this patch seem more useful.
--
Dan
More information about the xorg-devel
mailing list