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 }}
Repository navigation
-o results.json without a prefix silently writes text; infer format from the extension #490
-o results.json without a format: prefix writes the -format of stdout, which defaults to text. The file extension is never consulted, so results.json gets bare names.
Where
internal/cli/cli.go:697-701 (parseOutputs: format := def)
internal/cli/cli.go:246 (the prefix syntax, jsonl:results.jsonl)
Problem
subenum -simulate -o out.json example.com followed by jq . out.json fails with a parse error. A later -diff out.json reads a different shape than the name promises. This is an easy first-run trip in pipelines, because the prefix syntax is easy to miss.
Proposal
In parseOutputs, when there is no prefix and -format was not set explicitly, map .json, .jsonl/.ndjson, .csv and .txt to their formats. When -format was set and disagrees with a known extension, print a one-line notice. Document it in docs/cli.md next to the prefix syntax.
Acceptance criteria
-o out.json writes JSON; -o out.csv writes CSV; -o out still follows -format.
Activity