fix: flag path separators in --and patterns, not just the primary pattern
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The path-separator diagnostic (#1873, made unconditional for the primary pattern in #1975) only inspected opts.pattern. --and patterns (opts.exprs) are chained with the primary pattern and matched against the file name in exactly the same way, so a path separator in any of them is the same silent "no results" footgun. Factor the per-pattern check into a helper and apply it to the primary pattern plus every --and pattern, mirroring how ensure_use_hidden_option_for_leading_dot_pattern already iterates all patterns. --full-path still suppresses the diagnostic. Adds a regression test. See #1873.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+45 added−6 removed
- tests:+25 added−0 removed
- other:+20 added−6 removed