Skip to content

feat: add list command for managed worktrees#54

Merged
ffalor merged 3 commits into
ffalor:mainfrom
carlosmmatos:add-list-support
Mar 17, 2026
Merged

feat: add list command for managed worktrees#54
ffalor merged 3 commits into
ffalor:mainfrom
carlosmmatos:add-list-support

Conversation

@carlosmmatos

@carlosmmatos carlosmmatos commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Adds gh wt list (alias ls) to display all worktrees under the configured base directory in a clean, aligned table with a header row.

Uses manual column padding instead of tabwriter to avoid ANSI escape codes breaking column alignment. The NAME column is green-colored and the output looks like:

NAME                    BRANCH
falcon-mcp/issue_283    issue_283
falcon-mcp/testing123   testing123

The --all (-a) flag lists worktrees across all repos under the worktree base directory, grouped by repo with aligned columns:

$ gh wt list --all

falcon-mcp
  NAME              BRANCH
  issue_283         issue_283
  testing123        testing123

gh-wt
  NAME              BRANCH
  add-list-support  add-list-support

Includes unit tests for command structure, worktree filtering, display name formatting, and worktree grouping, plus integration tests covering the list output, --all grouped output, ls alias, --no-color flag, and --help.

@carlosmmatos carlosmmatos marked this pull request as draft March 12, 2026 13:14
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.
@carlosmmatos carlosmmatos marked this pull request as ready for review March 12, 2026 20:30
@ffalor ffalor merged commit 38f22ff into ffalor:main Mar 17, 2026
2 checks passed
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.

2 participants