[erlang-patches] Support ** for recursion in filelib:wildcard
José Valim
jose.valim@REDACTED
Wed Mar 14 14:04:16 CET 2012
Here is an updated patch for ** support in filelib:wildcard().
git fetch git://github.com/josevalim/otp.git fixed_double_star
https://github.com/josevalim/otp/compare/fixed_double_star
https://github.com/josevalim/otp/compare/fixed_double_star.patch
Quoting from bash documentation:
Two adjacent *'s used as a single pattern will match all files and zero or
more directories and subdirectories.
I have tested this against Bash 4.2 implementation (previously I was using
Ruby's implementation as basis). Since I didn't know there was a difference
between Ruby and Bash, I removed any reference to Ruby in the commit
message.
I have also kept the current filelib:wildcard() behavior of returning files
that start with dot ".". Bash by default does not return files starting
with "." in wildcards.
I have also improved the test coverage, documentation and added some
examples.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20120314/3d43467e/attachment.htm>
More information about the erlang-patches
mailing list