Skip to content

feat(config): bare wt config alias show lists full definitions - #2691

Merged
max-sixty merged 1 commit into
mainfrom
aliases-help
May 11, 2026
Merged

max-sixty merged 1 commit into
mainfrom
aliases-help

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

wt config alias show with no name showed a compact one-line summary listing (the name command-summary (source) table added in #2684). This swaps it for the full per-alias view: the same ○ Alias <name> (<source>): header + gutter block that wt config alias show <name> prints, emitted for every configured alias in name order (user entry before project when a name is defined in both), with the shadowed-by-built-in stderr warning preserved (once per name). --help / wt step --help keep the compact names-only Aliases: section and point here.

○ Alias landed (user):
  wt up && wt hook post-merge; git merge {{ default_branch }} --no-edit && { git
   diff {{ default_branch }} --quiet && git reset {{ default_branch }}; :; }
○ Alias sw (user):
  wt switch {{ args }}
○ Alias up (user):
  git fetch --all --prune && wt step for-each -- sh -c '
    ...
  '

Also drops the blank line between consecutive format_entry blocks — applied consistently to wt config alias show (the new listing), wt config alias show <name> (had a blank line between the user and project entries when a name is in both configs), and wt config alias dry-run <name> (same). The ○ Alias … header is the delimiter everywhere.

The compact-summary renderer (render_aliases_section + format_alias_summary) and its unit tests are removed — only #2684's no-arg listing used them; --help's names-only section is the separate render_aliases_help_section, which is untouched.

Changes

  • src/commands/config/alias.rs — list_aliases() rewritten to emit format_entry per alias; handle_alias_show / handle_alias_dry_run drop the inter-entry blank line; docstrings + module doc updated.
  • src/commands/alias.rs — delete render_aliases_section, format_alias_summary, and their tests; tidy the render_aliases_help_section doc.
  • src/cli/config.rs — wt config alias show help text reflects the new behavior.
  • Docs (docs/content/config.md, skill mirror) regenerated; three snapshots updated (one content change + cosmetic env drift on two).

Test plan

  • cargo run -- hook pre-merge --yes — 3581 tests pass, all lints green
  • Manual: wt config alias show, wt config alias show <name>, wt config alias dry-run, wt config alias show --help

🤖 Generated with Claude Code

Replaces the compact one-line summary listing (added in #2684) with the
full per-alias header + gutter block — what `wt config alias show <name>`
prints, repeated for every alias in name order, user entry before project.
`--help` keeps the compact names-only section and points here.

Also drops the blank line between consecutive `format_entry` blocks in
`wt config alias show`, `show <name>` (when a name is defined in both
configs), and `dry-run <name>` — the `○ Alias …` header is the delimiter.

Removes the now-unused `render_aliases_section` / `format_alias_summary`
and their unit tests.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 0147652 into main May 11, 2026
33 checks passed
@max-sixty
max-sixty deleted the aliases-help branch May 11, 2026 07:16
@max-sixty max-sixty mentioned this pull request May 13, 2026
max-sixty added a commit that referenced this pull request May 13, 2026
Release v0.50.0.

Highlights:

- Experimental Azure DevOps support (#1256, thanks @mikeyroush; fixes
#1144 from @dlecan) — `wt switch pr:<N>`, `wt list --full`, and `wt
config show --full` recognize Azure DevOps via the `az` CLI.
- Experimental Gitea CI-status detection (#2702) on top of the Gitea
`pr:` shortcut (#1320, thanks @SjB).
- Hooks now resolve `.config/wt.toml` from the worktree they act on —
the primary-worktree fallback is gone, and `post-remove` reads the
removed worktree's config (snapshotted before removal). Approval prompts
collect hook commands from the same worktree. Breaking change for setups
that relied on the primary-worktree fallback; the changelog entry has
the recovery action. (#2690, #2703, #2714, #2717, #2701, #2708, #2727,
#2736, #2748)
- The `wt switch` picker's `alt-r` removal no longer runs unapproved
project hooks (#2746) — the picker's removal path is now routed through
`handle_remove_output` and consults the existing approval state
read-only.
- `wt config alias show` with no name lists every alias's full
definition (#2684, #2691); `wt --help` switches to a compact aliases
pointer (#2688).
- `wt list --branches` warm-run perf: SHA-keyed cache for `main↕` and
`Remote⇅` ahead/behind counts; shared push-remote URL and local-branch
scan (#2704, #2718, #2673).
- Claude Code plugin ships the `wt-switch-create` skill (#2737, thanks
@onetom for #2631).

See `CHANGELOG.md` for the full list (8 Improved, 5 Fixed, 5 Internal).

semver-checks reports breaking library-API changes (new enum variants
without `#[non_exhaustive]`, removed `Branch::github_push_url`, new
trait method on `RemoteRefProvider`), which mandates at minimum a minor
bump pre-1.0.
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