mirror of
https://github.com/uutils/grep.git
synced 2026-06-10 16:15:11 -07:00
c50c0458cb
GNU grep tolerates options given more than once (boolean flags are idempotent, value options take the last occurrence), but clap rejected them with "cannot be used multiple times" (exit 2). Set args_override_self(true) so clap replaces rather than errors; args with ArgAction::Append (-e/-f/--include/--exclude) still accumulate. Found by the differential fuzzer (e.g. `grep -e .* -E -n -o -n -x`). Add a regression test covering repeated booleans, repeated value options (last wins), and that -e still accumulates patterns.