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

omit line numbers for stdin #356

Closed dicktyr closed 6 months ago

dicktyr commented 6 months ago

it seems reasonable to omit line numbers for stdin when specified as: --pretty=auto

genivia-inc commented 6 months ago

Thank you for your feedback. I'm not sure if everyone agrees. You can override -n with --no-line-number or use ugrep with the options you want.

dicktyr commented 6 months ago

--no-line-number appears to be undocumented

in any case, I generally do want line numbers for regular files but not for stdin by default

I presume most users agree, and since ugrep is already detecting context, it seems superfluous to create a wrapper script to (un)set options

genivia-inc commented 6 months ago

This is documented. Most option have --no- variants. This is clearly mentioned in the man page and also mentioned every time in --help OPTION at the bottom. It is also mentioned on ugrep.com in the section heading just below "Options".