Genivia / ugrep

NEW ugrep 6.5: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.56k stars 109 forks source link

Silencing "unnecessary" messages #352

Closed stdedos closed 6 months ago

stdedos commented 6 months ago

One routine ... dislike I have with grep is:

When I search / without sudo, I get a barrage of

ugrep: warning: cannot read /run/systemd/journal/streams/8:62791: Permission denied

messages. I understand the usefulness, the utility, and the reason for those messages.

... but they mess up my "expectation" that output is only what I am searching for (or nothing).

Can we "somehow" do so that those messages come "after" ugrep is done? or "just" as a summary?

ugrep: warning: cannot read 1347637 files: Permission denied
genivia-inc commented 6 months ago

These messages can be silenced with -s. Also specify --stats to see a report with the number of warnings generated (but not displayed).

stdedos commented 6 months ago

Nice, thanks! Very niche no-messages addition 👍