Useful or not, from you.
zstd zstdgrep does not correctly handle the -f argument of grep

The -f argument of grep behaves similarly to -e, in that it removes the need to pass the pattern string as a positional argument. Zstdgrep does not handle this correctly, and treats the first filename as if it were a pattern; as a result, the first file does not get decompressed when passing a pattern via -f.

For example, the zstdgrep command:

zstdgrep -E -f pattern.txt foo.zst bar.zst baz.zst

should be expanded into something like:

"zstdcat" -fq -- "foo.zst" | "grep" --label="foo.zst" -H  -E -f pattern.txt -
"zstdcat" -fq -- "bar.zst" | "grep" --label="bar.zst" -H  -E -f pattern.txt -
"zstdcat" -fq -- "baz.zst" | "grep" --label="baz.zst" -H  -E -f pattern.txt -

However, it's currently wrongly expanded as:

"zstdcat" -fq -- "bar.zst" | "grep" --label="bar.zst" -H  -E -f pattern.txt -- "foo.zst" -
"zstdcat" -fq -- "baz.zst" | "grep" --label="baz.zst" -H  -E -f pattern.txt -- "foo.zst" -
That's a useful answer
Without any help

Hi @codeman38, I've merged a fix into dev that addresses your issue. Let me know if you have any problems!