[Bug 259197] xzgrep should present a message when fed a non-recognised file format

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 11 Jan 2026 17:43:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259197

--- Comment #12 from Craig Leres <leres@freebsd.org> ---
> I'm confused. I don't know how you want to address this issue.

Possibly because I haven't said yet; it is my way to understand the problem and
desired behavior before proposing solutions.

> The "File format not recognized" message comes from xz when it 
> encounters a file it can't decompress, which includes text files.
> Once you add -f you're not getting that message anymore. And xz
> cannot distinguish between bzip2 files and regular text files.
> That's what I care about; I still want to be able to pass regular
> files to xzgrep without getting errors.

That's helpful.

So far I have:

 - should complain when fed the wrong compressed file
   (e.g. xzgrep vs. non xz file)

 - should "work" with plain (uncompressed) files

-- 
You are receiving this mail because:
You are the assignee for the bug.