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
Print warning if --hidden is not set and search pattern starts with a dot #615
Comments
Thank you for your feedback. I like the idea in general, but I certainly don't want to enable it for a pattern like fd -H '^\.gitlab-ci\.yml$' Having to escape all of this by hand is not very convenient, of course. This is why we have the fd -Hg .gitlab-ci.yml So what we could do would be the following: If the user does not pass the
… we could print a warning that no results will be found, because |
This is now implemented:
|
released in v8.2.0. |
I doon't know if this is a correct idea considering the double meaning the dot represent: both "any character" for its regex meaning and the fact it's an hidden file/folder.
However, searching today after for example
.gitlab-ci.yml
files in a whole tree, it didn't found anything at first, well because hidden file, so-H
flag is needed.I considered it could be a nice addition, if string start exactly by a dot to enable the flag, or not exclude hidden files with exact matching. This can however conflict with the "any character" meaning of the dot, so I'll let you decide whether this is a good idea or not.
The text was updated successfully, but these errors were encountered: