uutils / uutils/grep

cover -Z with normal filename prefixes

Open Beginner friendly
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
130
Forks
19
Avg merge
5h 28m
Merged PRs (30d)
12

Description

The existing tests cover -Z with -l, but not with normal matching output.

When running:

grep -Z -H x f

grep should place a NUL byte between the filename and the matched line.

I verified this behavior in both uutils grep and GNU grep 3.12 and prepared a small test-only change.

Would this test coverage be useful ?

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 from the existing tests covering -Z with -l and run grep -Z -H x f to observe the normal filename-prefix behavior. Add test coverage for a NUL byte between the filename and matched line, then run the relevant grep test suite and confirm the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.