Yes, it's messy.  Yes, it has a lot of goofy options.  Yes, its regex language is like nothing else anywhere (except its ancestors in the DEC operating systems, though [...] comes from Unix regex).

BUT: it's in C, and that makes it fast even on slow Schemes.  I think that alone makes it worth considering.

Specifics:  I think GLOB_MARK (terminate directory paths with slashes) should always be on, GLOB_ERR (raise an error if opening or reading a directory fails, otherwise carry on) should be exposed, and GLOB_NOSORT (don't sort results) should be exposed in the reverse sense. 

So:  (glob pattern report-error? sorted?).   The result is a list of strings, possibly an empty list (if you want the bash behavior of returning the pattern as a result, do it yourself).

Glibc exposes a lot more flags than Posix, but I don't think any of them are killers.

Comments?



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
What has four pairs of pants, lives in Philadelphia,
and it never rains but it pours?
        --Rufus T. Firefly