feat: add list command for managed worktrees#54
Merged
Conversation
Adds `gh wt list` (alias `ls`) to display all worktrees under the configured base directory. Uses manual column padding instead of tabwriter to avoid ANSI escape codes breaking column alignment. Output includes a header row with NAME and BRANCH columns.
Adds -a/--all flag that scans the worktree base directory and displays all worktrees grouped by repo with aligned columns. Includes unit tests, integration tests, and updated website/README docs.
40d7b82 to
59ae28a
Compare
ffalor
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
gh wt list(aliasls) to display all worktrees under the configured base directory in a clean, aligned table with a header row.Uses manual column padding instead of
tabwriterto avoid ANSI escape codes breaking column alignment. The NAME column is green-colored and the output looks like:The
--all(-a) flag lists worktrees across all repos under the worktree base directory, grouped by repo with aligned columns:Includes unit tests for command structure, worktree filtering, display name formatting, and worktree grouping, plus integration tests covering the list output,
--allgrouped output,lsalias,--no-colorflag, and--help.