[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] fnmatch egg
From: |
Michele La Monaca |
Subject: |
Re: [Chicken-users] fnmatch egg |
Date: |
Wed, 30 Jul 2014 17:24:28 +0200 |
Hi Caolan,
thanks for the egg, much needed addition (though I would like to see
it in the posix module rather than a separate egg). I used to
workaround (the lack of) it through ##sys#glob->regexp which is
another function I would like to be explicitly supported in core.
A few suggestions if you care:
1) Return the actual path rather than #t
(filter
string?
(map (lambda (x)
(fnmatch "[^b].scm" x)) '("a.scm" "b.scm" "c.scm")))
=> ("a.scm" "c.scm")
2) Add Windows support through the very similar win32 function PathMatchSpecEx
3) Drop the utf8 requirement
Regards,
Michele
On Sun, Jul 27, 2014 at 12:54 PM, Caolan McMahon
<address@hidden> wrote:
> I've just written some bindings to fnmatch(3), which provides
> shell-style wildcard pattern matching for filenames. Much like `glob`
> from the posix module, only it matches two strings, returning a
> boolean rather than descending directories and returning a list of
> matching filenames.
>
> https://github.com/caolan/chicken-fnmatch
>
> This is fairly trivial, but doesn't appear to be available anywhere
> else on the egg index. If someone could add it I'd appreciate it.
>
> Thanks,
>
> Caolan
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users