whateverable
whateverable copied to clipboard
git ls-files (“treegrep:”)
<Zoffix> AlexDaniel: feature request: ability to find to which distro a filename belongs too; aka
tree -f | grep XXX
:)
In other words: grepping by filename.
This is actually relatively easy. We can use git ls-files -z
to get the list of all files, then grep that with a 6lang regex similarly to how Quotable does it right now. There are about 17888 lines to grep through, and this is nothing. Quotable and Unicodable grep over millions of lines with 6lang regexes without any issues.
The only problem is that currently greppable is using perl5 regexes, so it is counter-intuitive to implement another command that does something different. Which kinda suggests that we may want to switch the whole thing to use 6lang regexes…
Quick prototype:
<AlexDaniel> treegrep: hello <greppable6> AlexDaniel, https://gist.github.com/a0f31a8418beb7c128cf21ea1030591d
- [ ] Surely these have to be links, but that's for another day.
-
[ ] Also, it currently gists “Found nothing”.
-
[ ] And it needs to have
50 files matched: https://…
inline summary.
I was assigned here because I was actively working on it. Now the experimental version is committed, so anyone should feel free to work on it.