You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
handles -q -c differently from GNU (prints the count 0 on no match instead of staying silent) #22
-q/--quiet must write nothing to stdout. When -q is combined with -c and the input contains no match, uu_grep still prints the count 0. GNU prints nothing. (When there is a match both stay silent, because -q makes the search exit early before the count is emitted — so the divergence only shows on the no-match path.)
I included the -L no-match case in #41 as part of the same fix. Both leaks come from EOF bookkeeping after the search reaches the end without a match: -c writes the final count and -L writes the filename. The patch puts the quiet-mode guard at the start of finalization so -q consistently means “exit status only,” whether the search exits early on a match or reaches EOF with no matches.
Activity
sylvestre commentedon Jun 4, 2026
The
-Lfilename output leaks the same way on the no-match path (samequietgap, different branch):wondr-wclabs commentedon Jun 5, 2026
I included the
-Lno-match case in #41 as part of the same fix. Both leaks come from EOF bookkeeping after the search reaches the end without a match:-cwrites the final count and-Lwrites the filename. The patch puts the quiet-mode guard at the start of finalization so-qconsistently means “exit status only,” whether the search exits early on a match or reaches EOF with no matches.