Ignore files without using .gitignore (.brootignore?)
I'd like a way to tell broot to ignore certain folders with a large number of useless files (~/.cache, ~/rust, ~/crates.io-index) without making a git repo around them (or hiding them). Is there a way to do this already? If not, I suggest a .brootignore file, which is parsed the same as a .gitignore file, except it's not required to be in a git repo.
Does that cover your need : https://dystroy.org/broot/conf_file/#special-paths ?
I think that would be nice, instead of .brootignore it would be great to use .ignore this would make broot compatible with fd, rg and friends, I think fd uses ignore, if I saw correctly broot does it's own parsing in ignore.rs.
Despite using broot most of the time, in certain situations, e.g. I need to share a command with colleagues I still default to rg or fd.
.ignore is useful for auto-generated files that are in the .gitignore but I want to see matches when searching, in that case special-paths is not that helpful as I need to specify a filetype rather than an absolute path.
A .ignore would leave each project to decide what can bypass .gitignore
I think that would be nice, instead of
.brootignoreit would be great to use.ignore
This looks like a good idea. I'll probably have a look at that.
if I saw correctly broot does it's own parsing
Yes. Parsing isn't really the problem, the problem is incrementally managing the stack of ignore files while going down the tree. The options I tested (including git2 and the ignore crate) were very slow at that game.
@FrancescElies I made https://github.com/Canop/broot/pull/931
I just noticed another use, it's not just for ignoring other files: it also allows unignoring files.
Test feedback welcome!
unignoring things is mostly what I used this for