Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix --show flag rejected as unknown in rodney start#43

Merged
simonw merged 2 commits into
main from
claude/fix-rodney-show-option-eNKzf
Mar 12, 2026
Merged

Fix --show flag rejected as unknown in rodney start #43
simonw merged 2 commits into
main from
claude/fix-rodney-show-option-eNKzf

Conversation

@simonw

@simonw simonw commented Mar 12, 2026
edited
Loading

Copy link
Copy Markdown
Owner

The rodney --help output shows rodney start --show as an option, but that using that --show option returns an error, investigate

The first flag-parsing loop in cmdStart only recognized --insecure/-k,
causing --show to hit the default case and exit with "unknown flag" error.
The second loop that handled --show was unreachable.

Extract flag parsing into testable parseStartArgs function that handles
all flags (--show, --insecure, -k) in a single pass. Add tests covering
each flag individually, combined flags, and unknown flag rejection.

https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C

claude added 2 commits March 12, 2026 16:16
The first flag-parsing loop in cmdStart only recognized --insecure/-k,
causing --show to hit the default case and exit with "unknown flag" error.
The second loop that handled --show was unreachable.
Extract flag parsing into testable parseStartArgs function that handles
all flags (--show, --insecure, -k) in a single pass. Add tests covering
each flag individually, combined flags, and unknown flag rejection.
https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C 
Port 6 functions to use Go's standard flag package:
- parseStartArgs: --show, --insecure/-k
- cmdReload: --hard
- cmdScreenshot: -w/--width, -h/--height + positional filename
- cmdAXTree: --depth, --json
- cmdAXFind: --name, --role, --json
- cmdAXNode: --json + positional selector (hybrid pre-extraction)
Leave parseAssertArgs and extractScopeArgs as-is because their
flags-anywhere-in-the-arg-list semantics are incompatible with
flag.Parse which stops at the first non-flag argument.
Add findUnknownFlag helper for backward-compatible error messages.
https://claude.ai/code/session_019dG8c5MD6DibdiFCXcSq7C 
@simonw simonw merged commit a842432 into main Mar 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /