Repository navigation
feat(cli): accept -o as short for --output - #87
Conversation
tee8z
left a comment
There was a problem hiding this comment.
Approved 79b7856 against master 520c775. -o is the only short form added, and clap's command-tree assertions run in the test suite, so a clash with another flag would fail there. The new test covers -o before and after the subcommand, and global-flags.md is regenerated.
Validation on this head, in nix develop: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata and python3 scripts/check-coverage.py passed. In cargo test --locked, all 132 unit tests passed. One integration test failed once: login_on_a_terminal_reports_why_no_profile_was_saved_and_still_succeeds timed out waiting for the command to exit. It comes from #75, and this PR does not touch it. It passed in the CRAP run's full suite on this head, and in 2 of 3 isolated reruns, with the failure at a different line each time. That is a timing flake under load, not this change. CRAP: 608 measured functions, none at or above 20, highest wait_for_payment at 19.60; 174 functions were unmeasured. CI is green.
-ois now short for--output, as involtage wallets list -o json.In the CLI benchmark, agents tried
-o jsonand gotunexpected argument '-o'. Closes #85.Stack: 1 of 6, based on
master. The PRs above it don't depend on this change; they share the stack only to keepCHANGELOG.mdordered.CHANGELOG.md(Unreleased) is updated, anddocs/reference/global-flags.mdis regenerated withVOLTAGE_BLESS=1.cargo test(252 tests) andcheck-coverage.py.master. A new unit test parses-o jsonboth before and after the subcommand. The change adds no error or early-return path.79b7856: 0 functions at or above 20. The highest iswait_for_payment(src/api.rs) at 19.60.-oas its short form.