Branch names can be long and tedious to type when switching between worktrees. It would be helpful if wt list displayed an index column, and if wt switch accepted that index as a shortcut.
Example output from wt list:
# Branch Status ...
1 feature-a ⚑^ ...
2 feature-b ✗| ...
3 bugfix-c ! ✗⇡ ...
Then running:
would switch to feature-b.
If the argument passed to wt switch is a number that matches an index, it should be treated as an index. Otherwise, it should be treated as a branch name to preserve backwards compatibility.
Branch names can be long and tedious to type when switching between worktrees. It would be helpful if
wt listdisplayed an index column, and ifwt switchaccepted that index as a shortcut.Example output from
wt list:Then running:
would switch to
feature-b.If the argument passed to
wt switchis a number that matches an index, it should be treated as an index. Otherwise, it should be treated as a branch name to preserve backwards compatibility.