Correct the README --json global-flag claim and lock it against drift #99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Fix
README.md:177-178so--jsonis no longer listed among the flags that "work on every command." Move it out of the global list and describe it as applying to data-returning commands (list/view/etc.), matching the accurate in-binary top-level help atsrc/cli/mod.rs:64. The genuinely global flags stay as listed (--host,--debug,--no-pager,--json-fields). Add a test that asserts the README "global flags" line stays in sync with the set ofglobal = trueargs on the clapClistruct (src/cli/mod.rs:82-99) so the doc and the code cannot drift apart again.Why
rasterstate/fj#94: the README sells JSON output as a headline feature "so scripts and AI agents" can consume
fj, and lists--jsonas a global flag, but only four flags areglobal = true;--jsonis declared per-subcommand, sofj auth status --jsonfails with "unexpected argument '--json' found." Scripters and agents are exactly the audience that reads "works on every command" literally and builds it into a wrapper, turning a marquee selling point into a first-contact trust paper cut. The in-binary help is already correct, so this is a verified doc-vs-code contradiction with a real user-facing error, fixed by correcting the doc rather than changing behavior.Acceptance
--jsonis global; it documents--jsonas applying to data-returning commands (list/view/etc.).global = trueargs inClidiverge.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
none
Out of scope
--jsonto a real global flag (the larger alternative direction); this item fixes the doc to match current behavior rather than changing behavior.--json-fieldsor the JSON output format.Size
S