Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

grep: context output omits group separators between files

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@SichenLiang is already working on this.

Since Oct 2, 2026.

  • #131 by @SichenLiang — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start by running the provided reproducer and comparing uutils output with GNU grep, including -r, --no-group-separator, and --group-separator=STRING. Trace the context-group handling for multiple input files and add or update coverage so separators appear at file boundaries while existing within-file behavior remains unchanged.

Written by the indexing model from the issue text.

Description

When context output continues into another file, uutils grep does not print a group separator before the first group in that file.

printf 'hit\nno\nno\nhit\n' > first
printf 'hit\n' > second
grep -n -C0 hit first second

The current uutils output is:

first:1:hit
--
first:4:hit
second:1:hit

GNU grep 3.12 inserts another separator between the files:

first:1:hit
--
first:4:hit
--
second:1:hit

The same difference appears with -r when matches come from two explicitly named directories. All commands exit 0 with empty stderr. GNU also applies --no-group-separator and --group-separator=STRING across file boundaries.

#24 and #42 concern groups within a single file.

Dominant language
Rust
Stars
133
Forks
25
Avg merge
19h 49m
Merged PRs (30d)
11

Getting set up

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.

More from uutils/grep

All issues in uutils/grep

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.