Skip to content

Conversation

@max-sixty
Copy link
Owner

Summary

  • wt switch without arguments now opens the interactive picker (previously wt select)
  • wt select remains as a deprecated hidden alias with deprecation warning
  • --branches and --remotes flags added to wt switch for picker customization
  • Removed the separate wt select docs page; functionality documented under wt switch
  • The [select] config section is preserved for backward compatibility

Test plan

  • wt switch without args opens interactive picker (Unix)
  • wt switch without args shows error on Windows
  • wt select shows deprecation warning then works
  • wt switch --branches / wt switch --remotes work
  • All tests pass (cargo run -- hook pre-merge --yes)
  • Shell completions no longer show select

Closes #890

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

max-sixty and others added 3 commits January 28, 2026 17:10
`wt switch` without arguments now opens the interactive picker (previously
`wt select`). This simplifies the mental model: one command for all switching.

- `wt switch` → opens interactive picker (Unix) or shows error (Windows)
- `wt switch --branches/--remotes` → customizes picker
- `wt select` → deprecated hidden alias with warning

Removes the separate `wt select` docs page since the functionality is now
documented under `wt switch`. The `[select]` config section is preserved
for backward compatibility with a TODO to rename once migration is confirmed.

Closes #890

Co-Authored-By: Claude <noreply@anthropic.com>
The test expects the Unix error message ("Interactive picker requires
an interactive terminal") but Windows shows a different message
("Interactive picker is not available on Windows").

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@juice928
Copy link

👋 Hi, I'm an automated AI code review bot. I ran some checks on this PR and found 1 point that might be worth attention (could be false positives, please use your judgment):

  1. Refining flag handling in wt switch when the branch argument is missing
    • Location: src/main.rs:L756-L794
    • Impact: Operational flags (like --create or --execute) might be silently ignored in favor of the interactive picker, which could lead to unexpected command behavior.
    • Suggestion: Consider verifying if any specific flags are set before defaulting to the picker, or using clap constraints to enforce argument requirements.

If you find these suggestions disruptive, you can reply "stop" , and I'll automatically skip this repository in the future.

…r --clobber

These flags only make sense when switching to a specific branch, not when
opening the interactive picker. Previously, running `wt switch --create`
would silently ignore the flag and open the picker instead.

Now clap properly enforces that these flags require a branch argument:

    $ wt switch --create
    error: the following required arguments were not provided:
      <BRANCH>

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty
Copy link
Owner Author

max-sixty commented Jan 29, 2026

Decent observation, thanks! Fixed in 92cf72a — flags like --create, --base, --execute, and --clobber now properly require a branch argument via clap's requires = "branch".

[CC on behalf of Max]

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.

Proposal for UX discussion - combine switch and select into switch

3 participants