Trying to figure out how to best integrate this functionality.
It occurred to me that glob(3) is built-in to libc, but the
Xcompile()/Xexecute() model seems to be biases to regex-like approaches, if
I've read the code correctly.
I could translate patterns into regex's:
1. Prepend ^
2. Translate:
. => \.
? => [^/]
* => [^/]*
\x => \x
{a,b} => (a|b)
[xyz] => [xyz]
x => x
There's a little more subtlety than that... for instance, how [xyz] gets
collected if x is ']' then x is rewritten as \]. And x, y, and z can't be /.
3. Append $
Is there a better way?
Thanks