Raku / Raku/whateverable

git ls-files (“treegrep:”)

Open
#210 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

greppable
Dominant language
Raku
Stars
19
Forks
16
PR merge metrics
No merged PRs in 30d

Description

<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…

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing greppable command and compare how Quotable and Unicodable perform regex searches. Investigate the proposed git ls-files -z filename list and decide whether this feature should use the existing Perl 5 regexes or a consistent 6lang regex approach. Done means users can grep filenames and the regex behavior is clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.