mk_fnmatch_compile — Compile glob patterns to a function
mk_fnmatch_compile
patterns
...
Generates a new shell function which acts
as a matching predicate for patterns
.
When the generated function is invoked with the
string path
, it will return 0
(logical true) if
would succeed for any mk_fnmatch
path
pattern
pattern
in
patterns
, and 1 (logical false)
otherwise.
Sets result
to the generated function.
Be sure to use unset -f
to undefine it
when you are done.