Skip to content

Add "wt cd .." as shortcut for "wt root"#9

Merged
bkildow merged 1 commit intomainfrom
feature/cd-dotdot-alias
Mar 23, 2026
Merged

Add "wt cd .." as shortcut for "wt root"#9
bkildow merged 1 commit intomainfrom
feature/cd-dotdot-alias

Conversation

@bkildow
Copy link
Copy Markdown
Owner

@bkildow bkildow commented Mar 23, 2026

Summary

  • Adds wt cd .. as a natural alias for wt root, printing the project root path
  • Short-circuits before worktree listing for efficiency when .. is passed
  • Updates the cd command's help text to document the shortcut

Test plan

  • make dev passes (fmt, lint, tests, build)
  • Run wt cd .. from inside a worktree and verify it prints the project root
  • Run wt cd <branch> to confirm normal behavior is unchanged
  • Run wt cd with no args to confirm interactive picker still works

Allows navigating to the project root via "wt cd .." which feels
more natural than remembering the separate "wt root" command.
Short-circuits before worktree listing for efficiency.
@bkildow bkildow merged commit 85a7fcf into main Mar 23, 2026
@bkildow bkildow deleted the feature/cd-dotdot-alias branch March 23, 2026 19:37
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.

1 participant