Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern for find requires search directory prefix #387

Open
theNerd247 opened this issue May 3, 2020 · 3 comments
Open

Pattern for find requires search directory prefix #387

theNerd247 opened this issue May 3, 2020 · 3 comments

Comments

@theNerd247
Copy link

Reporting this as a note. @Gabriel439 remind me to put a PR in for this sometime. Here's the problem:

 find (decimal *> ".md") "./md"

Is my first intuition for searching for all markdown files with a decimal only name in a given directory. However this Pattern fails because it is required to match the entire path. However, the following works

 find ("./md/" *> decimal *> ".md") "./md"

This seems counter-intuitive to what find should be doing: matching against only the basename of a file as apposed to the relative path from the CWD.

@Gabriella439
Copy link
Owner

This is intentional, even if it does differ from the behavior of Unix find. You can do find (suffix (decimal *> ".md")) if you want to match against a suffix

@theNerd247
Copy link
Author

Gotcha. Mind if it add this to the Haddock? I think it would make it easier for those coming from writing Bash scripts.

@Gabriella439
Copy link
Owner

@theNerd247: Yeah, definitely! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants