Skip to content

feat(cli): accept -o as short for --output - #87

Merged
thebrandonlucas merged 1 commit into
masterfrom
feat/cli-output-short-o
Oct 22, 2026
Merged

thebrandonlucas merged 1 commit into
masterfrom
feat/cli-output-short-o

Conversation

@thebrandonlucas

@thebrandonlucas thebrandonlucas commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

-o is now short for --output, as in voltage wallets list -o json.

In the CLI benchmark, agents tried -o json and got unexpected 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 keep CHANGELOG.md ordered.

  • User-visible change: CHANGELOG.md (Unreleased) is updated, and docs/reference/global-flags.md is regenerated with VOLTAGE_BLESS=1.
  • The verification gate passes: fmt, clippy, machete, cargo test (252 tests) and check-coverage.py.
  • Reviewed against master. A new unit test parses -o json both before and after the subcommand. The change adds no error or early-return path.
  • CRAP on 79b7856: 0 functions at or above 20. The highest is wait_for_payment (src/api.rs) at 19.60.
  • Checks not run: none. I confirmed that no other flag uses -o as its short form.

@tee8z tee8z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@thebrandonlucas
thebrandonlucas merged commit 2486070 into master Oct 22, 2026
7 checks passed
@thebrandonlucas
thebrandonlucas deleted the feat/cli-output-short-o branch October 22, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add -o as a short alias for --output

2 participants