Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Extend `-v` variable dump to aliases + help-table drift test (#2324)

Maximilian Roos025326050316
diff --git a/docs/content/config.md b/docs/content/config.md
index 599723ef1..6dba6163b 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -494,9 +494,8 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -556,9 +555,8 @@ Usage: <b><span class=c>wt config show</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -608,9 +606,8 @@ Usage: <b><span class=c>wt config approvals</span></b> <span class=c>[OPTIONS]</
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -653,9 +650,8 @@ Usage: <b><span class=c>wt config alias</span></b> <span class=c>[OPTIONS]</span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -729,9 +725,8 @@ Usage: <b><span class=c>wt config state</span></b> <span class=c>[OPTIONS]</span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -788,9 +783,8 @@ Usage: <b><span class=c>wt config state default-branch</span></b> <span class=c>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -894,9 +888,8 @@ Usage: <b><span class=c>wt config state logs</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -956,9 +949,8 @@ Usage: <b><span class=c>wt config state ci-status</span></b> <span class=c>[OPTI
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -1030,9 +1022,8 @@ Usage: <b><span class=c>wt config state marker</span></b> <span class=c>[OPTIONS
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -1106,9 +1097,8 @@ Usage: <b><span class=c>wt config state vars</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/hook.md b/docs/content/hook.md
index 603867f6a..b254ec9fa 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -160,7 +160,7 @@ Some variables are conditional: `upstream` requires remote tracking; `base` only
sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"
```
-Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`).
+Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`). Aliases do the same under `-v`: `wt -v <alias>` prints the alias's in-scope variables before the pipeline runs.
Variables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:
@@ -455,9 +455,8 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/list.md b/docs/content/list.md
index 01bac4c68..9946e345d 100644
--- a/docs/content/list.md
+++ b/docs/content/list.md
@@ -281,9 +281,8 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/merge.md b/docs/content/merge.md
index 61dad023c..0b5e4809d 100644
--- a/docs/content/merge.md
+++ b/docs/content/merge.md
@@ -146,9 +146,8 @@ Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/remove.md b/docs/content/remove.md
index 4125df228..2f9a6cf4a 100644
--- a/docs/content/remove.md
+++ b/docs/content/remove.md
@@ -133,9 +133,8 @@ Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/step.md b/docs/content/step.md
index 0880824c6..c65de8b67 100644
--- a/docs/content/step.md
+++ b/docs/content/step.md
@@ -76,9 +76,8 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -157,9 +156,8 @@ Usage: <b><span class=c>wt step commit</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -241,9 +239,8 @@ Usage: <b><span class=c>wt step squash</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -303,9 +300,8 @@ Usage: <b><span class=c>wt step diff</span></b> <span class=c>[OPTIONS]</span> <
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -439,9 +435,8 @@ Usage: <b><span class=c>wt step copy-ignored</span></b> <span class=c>[OPTIONS]<
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -518,9 +513,8 @@ Usage: <b><span class=c>wt step eval</span></b> <span class=c>[OPTIONS]</span> <
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -592,9 +586,8 @@ Usage: <b><span class=c>wt step for-each</span></b> <span class=c>[OPTIONS]</spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -670,9 +663,8 @@ Usage: <b><span class=c>wt step promote</span></b> <span class=c>[OPTIONS]</span
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -745,9 +737,8 @@ Usage: <b><span class=c>wt step prune</span></b> <span class=c>[OPTIONS]</span>
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
@@ -839,9 +830,8 @@ Usage: <b><span class=c>wt step relocate</span></b> <span class=c>[OPTIONS]</spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/docs/content/switch.md b/docs/content/switch.md
index bf499b358..54b5a37c2 100644
--- a/docs/content/switch.md
+++ b/docs/content/switch.md
@@ -217,9 +217,8 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa
User config file path
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable &amp; output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
<b><span class=c>-y</span></b>, <b><span class=c>--yes</span></b>
Skip approval prompts
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index ad782cfcd..5ed8c2a41 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -497,9 +497,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -561,9 +560,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -619,9 +617,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -669,9 +666,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -759,9 +755,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -820,9 +815,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -936,9 +930,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -998,9 +991,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -1071,9 +1063,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -1158,9 +1149,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index f435527aa..5e2849a62 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -151,7 +151,7 @@ Some variables are conditional: `upstream` requires remote tracking; `base` only
sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"
```
-Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`).
+Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`). Aliases do the same under `-v`: `wt -v <alias>` prints the alias's in-scope variables before the pipeline runs.
Variables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:
@@ -447,9 +447,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/list.md b/skills/worktrunk/reference/list.md
index 7f4641732..95185468b 100644
--- a/skills/worktrunk/reference/list.md
+++ b/skills/worktrunk/reference/list.md
@@ -311,9 +311,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/merge.md b/skills/worktrunk/reference/merge.md
index 2c14fe602..3fc66e7cd 100644
--- a/skills/worktrunk/reference/merge.md
+++ b/skills/worktrunk/reference/merge.md
@@ -136,9 +136,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/remove.md b/skills/worktrunk/reference/remove.md
index 59ccda072..d1ec817f3 100644
--- a/skills/worktrunk/reference/remove.md
+++ b/skills/worktrunk/reference/remove.md
@@ -132,9 +132,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/step.md b/skills/worktrunk/reference/step.md
index 45364eedf..876d642a4 100644
--- a/skills/worktrunk/reference/step.md
+++ b/skills/worktrunk/reference/step.md
@@ -68,9 +68,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -157,9 +156,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -245,9 +243,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -317,9 +314,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -453,9 +449,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -538,9 +533,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -620,9 +614,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -701,9 +694,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -783,9 +775,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
@@ -885,9 +876,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.md
index e4f6f0104..00b31a899 100644
--- a/skills/worktrunk/reference/switch.md
+++ b/skills/worktrunk/reference/switch.md
@@ -209,9 +209,8 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for
- each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under
- .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs +
+ diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index a995db214..b940b50a5 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -241,7 +241,7 @@ pub(crate) struct Cli {
)]
pub config: Option<std::path::PathBuf>,
- /// Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ /// Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
#[arg(
long,
short = 'v',
@@ -1292,7 +1292,7 @@ Some variables are conditional: `upstream` requires remote tracking; `base` only
sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"
```
-Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`).
+Run any hook-firing command with `-v` to see the resolved variables for the actual invocation — each hook prints a `template variables:` block showing every in-scope variable and its value (`(unset)` for conditional vars that didn't populate, like `target_worktree_path` during `wt switch -`). Aliases do the same under `-v`: `wt -v <alias>` prints the alias's in-scope variables before the pipeline runs.
Variables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:
diff --git a/src/commands/alias.rs b/src/commands/alias.rs
index b6099a0fd..4673c4d34 100644
--- a/src/commands/alias.rs
+++ b/src/commands/alias.rs
@@ -36,10 +36,13 @@ use anyhow::{Context, bail};
use color_print::cformat;
use worktrunk::config::{
ALIAS_ARGS_KEY, CommandConfig, HookStep, ProjectConfig, UserConfig, append_aliases,
- referenced_vars_for_config,
+ format_alias_variables, referenced_vars_for_config,
};
use worktrunk::git::Repository;
-use worktrunk::styling::{eprintln, println, progress_message, warning_message};
+use worktrunk::styling::{
+ eprintln, format_with_gutter, info_message, println, progress_message, verbosity,
+ warning_message,
+};
use crate::commands::command_approval::approve_alias_commands;
use crate::commands::command_executor::{
@@ -512,6 +515,12 @@ fn run_alias(
let context_json = serde_json::to_string(&context_map)
.expect("HashMap<String, String> serialization should never fail");
+ if verbosity() >= 1 {
+ let vars = format_alias_variables(&context_map);
+ eprintln!("{}", info_message("template variables:"));
+ eprintln!("{}", format_with_gutter(&vars, None));
+ }
+
eprintln!(
"{}",
progress_message(format_alias_announcement(&opts.name, cmd_config))
diff --git a/src/config/expansion.rs b/src/config/expansion.rs
index 6ad05dd77..d5d06ce54 100644
--- a/src/config/expansion.rs
+++ b/src/config/expansion.rs
@@ -189,24 +189,38 @@ pub fn vars_available_in(scope: ValidationScope) -> Vec<&'static str> {
vars
}
-/// Format the resolved template variables for a hook invocation as an
-/// aligned `name = value` block — no heading, no indent, caller wraps.
+/// Shared formatter for [`format_hook_variables`] and [`format_alias_variables`].
///
-/// Ordered per the `## Template variables` help table in `src/cli/mod.rs`:
-/// active, operation, repo, exec. A variable appears if it's in scope for
-/// `hook_type` per [`vars_available_in`]. Values come from `ctx`; vars that
-/// are in-scope but absent from `ctx` render as `(unset)` — this surfaces
-/// operation-specific gaps (e.g., `target_worktree_path` during
-/// `wt switch -`, `upstream` when the branch doesn't track a remote).
+/// Renders `vars` as an aligned `name = value` block — no heading, no indent,
+/// caller wraps. Values come from `ctx`; vars absent from `ctx` render as
+/// `(unset)`, surfacing operation-specific gaps (e.g., `target_worktree_path`
+/// during `wt switch -`, `upstream` when the branch doesn't track a remote).
///
/// `(unset)` relies on an invariant in `build_hook_context`: optional vars
/// are omitted from the map rather than inserted as empty strings. If a
/// future caller starts inserting `""`, revisit the empty-vs-absent
/// distinction here.
+fn format_variables_table(vars: &[&'static str], ctx: &HashMap<String, String>) -> String {
+ let max_name = vars.iter().map(|v| v.len()).max().unwrap_or(0);
+ vars.iter()
+ .map(|var| {
+ let value = match ctx.get(*var) {
+ Some(v) => v.as_str(),
+ None => "(unset)",
+ };
+ format!("{var:<max_name$} = {value}")
+ })
+ .collect::<Vec<_>>()
+ .join("\n")
+}
+
+/// Format the resolved template variables for a hook invocation.
+///
+/// Ordered per the `## Template variables` help table in `src/cli/mod.rs`:
+/// active, operation, repo, exec, infrastructure.
///
/// Deprecated aliases and `vars.*` (user state) are intentionally omitted.
pub fn format_hook_variables(hook_type: HookType, ctx: &HashMap<String, String>) -> String {
- // Flat list in the canonical docs order: active, operation, repo, exec.
let vars: Vec<&'static str> = ACTIVE_VARS
.iter()
.chain(hook_extras(hook_type))
@@ -215,19 +229,23 @@ pub fn format_hook_variables(hook_type: HookType, ctx: &HashMap<String, String>)
.chain(HOOK_INFRASTRUCTURE_VARS)
.copied()
.collect();
+ format_variables_table(&vars, ctx)
+}
- let max_name = vars.iter().map(|v| v.len()).max().unwrap_or(0);
-
- vars.iter()
- .map(|var| {
- let value = match ctx.get(*var) {
- Some(v) => v.as_str(),
- None => "(unset)",
- };
- format!("{var:<max_name$} = {value}")
- })
- .collect::<Vec<_>>()
- .join("\n")
+/// Format the resolved template variables for an alias invocation.
+///
+/// Ordering mirrors [`format_hook_variables`]; alias scope has no operation
+/// or infrastructure vars, and `args` sits between active and repo (it's the
+/// alias analogue of hook-operation context).
+pub fn format_alias_variables(ctx: &HashMap<String, String>) -> String {
+ let vars: Vec<&'static str> = ACTIVE_VARS
+ .iter()
+ .copied()
+ .chain(std::iter::once(ALIAS_ARGS_KEY))
+ .chain(REPO_VARS.iter().copied())
+ .chain(EXEC_BASE_VARS.iter().copied())
+ .collect();
+ format_variables_table(&vars, ctx)
}
/// Positional CLI args forwarded from `wt <alias> a b c` into the alias's
@@ -1930,7 +1948,7 @@ mod tests {
}
#[test]
- fn test_format_hook_variables_scope_filters_operation() {
+ fn test_format_hook_variables_filters_operation() {
// pre-commit only has `target` in operation scope — no base*, pr_*, etc.
let mut ctx: HashMap<String, String> = HashMap::new();
ctx.insert("target".into(), "main".into());
@@ -1945,4 +1963,27 @@ mod tests {
"pre-commit has no `pr_number`; got: {out}"
);
}
+
+ #[test]
+ fn test_format_alias_variables_includes_args_no_hook_keys() {
+ let mut ctx: HashMap<String, String> = HashMap::new();
+ ctx.insert("branch".into(), "feature".into());
+ ctx.insert("worktree_path".into(), "/tmp/feature".into());
+ ctx.insert("worktree_name".into(), "feature".into());
+ ctx.insert("repo".into(), "demo".into());
+ ctx.insert("repo_path".into(), "/tmp/demo".into());
+ ctx.insert("cwd".into(), "/tmp/feature".into());
+ // args is JSON-encoded per `ALIAS_ARGS_KEY` contract.
+ ctx.insert(ALIAS_ARGS_KEY.into(), r#"["a","b c"]"#.into());
+
+ let out = format_alias_variables(&ctx);
+ assert!(
+ out.contains(r#"args = ["a","b c"]"#),
+ "got: {out}"
+ );
+ // No hook-only keys appear in alias scope.
+ assert!(!out.contains("hook_type"), "got: {out}");
+ assert!(!out.contains("target"), "got: {out}");
+ assert!(!out.contains("base "), "got: {out}");
+ }
}
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 9c36010a3..c9741723b 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -122,9 +122,10 @@ pub use deprecation::{
};
pub use expansion::{
ACTIVE_VARS, ALIAS_ARGS_KEY, DEPRECATED_TEMPLATE_VARS, EXEC_BASE_VARS, REPO_VARS,
- TemplateExpandError, ValidationScope, base_vars, expand_template, format_hook_variables,
- redact_credentials, referenced_vars_for_config, sanitize_branch_name, sanitize_db, short_hash,
- template_references_var, validate_template, validate_template_syntax, vars_available_in,
+ TemplateExpandError, ValidationScope, base_vars, expand_template, format_alias_variables,
+ format_hook_variables, redact_credentials, referenced_vars_for_config, sanitize_branch_name,
+ sanitize_db, short_hash, template_references_var, validate_template, validate_template_syntax,
+ vars_available_in,
};
pub use hooks::HooksConfig;
pub use project::{ProjectCiConfig, ProjectConfig, ProjectListConfig, valid_project_config_keys};
diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rs
index 3001a26ca..82d0513ac 100644
--- a/tests/integration_tests/readme_sync.rs
+++ b/tests/integration_tests/readme_sync.rs
@@ -2318,6 +2318,116 @@ fn test_command_pages_and_skill_files_are_in_sync() {
}
}
+/// The hand-authored `## Template variables` table in `src/cli/mod.rs` must
+/// match the variable constants in `src/config/expansion.rs`. Drift means the
+/// help docs lie about which vars hooks and aliases can reference.
+///
+/// Checks presence and group placement; descriptions stay free-form prose.
+#[test]
+fn test_template_variables_table_matches_constants() {
+ use std::collections::{BTreeMap, BTreeSet};
+ use strum::IntoEnumIterator;
+ use worktrunk::config::{
+ ACTIVE_VARS, ALIAS_ARGS_KEY, DEPRECATED_TEMPLATE_VARS, EXEC_BASE_VARS, REPO_VARS,
+ ValidationScope, vars_available_in,
+ };
+ use worktrunk::git::HookType;
+
+ let cli_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("src/cli/mod.rs");
+ let content = fs::read_to_string(&cli_path).unwrap();
+
+ // Carve out the `## Template variables` section: from its heading to the
+ // next `\n## ` (next level-2 heading). Anchored on the exact heading so an
+ // unrelated `## Template …` elsewhere can't be mistaken for it.
+ let heading = "\n## Template variables\n";
+ let start = content
+ .find(heading)
+ .expect("`## Template variables` heading missing in src/cli/mod.rs");
+ let rest = &content[start + heading.len()..];
+ let end = rest.find("\n## ").unwrap_or(rest.len());
+ let section = &rest[..end];
+
+ // Parse table rows: `| kind | `{{ name }}` | description |`. The kind
+ // column only appears on the first row of each group — subsequent rows
+ // leave it blank, inheriting the last-seen value.
+ let var_re = Regex::new(r"\{\{\s*([a-zA-Z_][a-zA-Z0-9_.<>]*)\s*\}\}").unwrap();
+ let mut actual: BTreeMap<String, BTreeSet<String>> = BTreeMap::new();
+ let mut current_kind: Option<String> = None;
+ for line in section.lines() {
+ if !line.starts_with("| ") || line.starts_with("|---") {
+ continue;
+ }
+ let cells: Vec<&str> = line.split('|').map(str::trim).collect();
+ // cells[0] and cells[last] are empty (leading/trailing `|`).
+ if cells.len() < 4 {
+ continue;
+ }
+ let kind_cell = cells[1];
+ let var_cell = cells[2];
+ // Skip the header row.
+ if kind_cell == "Kind" {
+ continue;
+ }
+ if !kind_cell.is_empty() {
+ current_kind = Some(kind_cell.to_string());
+ }
+ let Some(kind) = current_kind.as_ref() else {
+ continue;
+ };
+ if let Some(cap) = var_re.captures(var_cell) {
+ let name = cap[1].to_string();
+ actual.entry(kind.clone()).or_default().insert(name);
+ }
+ }
+
+ // Build expected groups from constants.
+ let mut expected: BTreeMap<String, BTreeSet<String>> = BTreeMap::new();
+ expected.insert(
+ "active".into(),
+ ACTIVE_VARS.iter().map(|s| s.to_string()).collect(),
+ );
+ expected.insert(
+ "repo".into(),
+ REPO_VARS.iter().map(|s| s.to_string()).collect(),
+ );
+ // `exec` in the docs = runtime infra vars plus `args` (hook+alias body
+ // forwarding). The `hook_type`/`hook_name` names aren't exported as a
+ // constant, so they're inlined here — anchoring them to the table row
+ // they appear in.
+ let mut exec: BTreeSet<String> = EXEC_BASE_VARS.iter().map(|s| s.to_string()).collect();
+ exec.insert("hook_type".into());
+ exec.insert("hook_name".into());
+ exec.insert(ALIAS_ARGS_KEY.to_string());
+ expected.insert("exec".into(), exec);
+ // `user` row has a single entry — the `{{ vars.<key> }}` placeholder.
+ expected.insert("user".into(), BTreeSet::from(["vars.<key>".to_string()]));
+ // `operation` = union of hook-type-specific extras. Derived through the
+ // public `vars_available_in` so this test doesn't depend on the private
+ // `hook_extras` helper.
+ let base: BTreeSet<&&str> = ACTIVE_VARS
+ .iter()
+ .chain(REPO_VARS.iter())
+ .chain(EXEC_BASE_VARS.iter())
+ .chain(DEPRECATED_TEMPLATE_VARS.iter())
+ .collect();
+ let infra_and_args: BTreeSet<&str> = ["hook_type", "hook_name", ALIAS_ARGS_KEY].into();
+ let mut operation: BTreeSet<String> = BTreeSet::new();
+ for ht in HookType::iter() {
+ for v in vars_available_in(ValidationScope::Hook(ht)) {
+ if !base.contains(&v) && !infra_and_args.contains(v) {
+ operation.insert(v.to_string());
+ }
+ }
+ }
+ expected.insert("operation".into(), operation);
+
+ assert_eq!(
+ actual, expected,
+ "`## Template variables` table in src/cli/mod.rs drifted from \
+ constants in src/config/expansion.rs. Update the table or the constants."
+ );
+}
+
/// Verify that post_process_for_html() transforms the approval prompt code block
/// into a styled terminal shortcode. If the source text in cli/mod.rs changes
/// without updating the replacement in help.rs, the .replace() silently stops
diff --git a/tests/integration_tests/step_alias.rs b/tests/integration_tests/step_alias.rs
index 4c067c86a..c9fac7a00 100644
--- a/tests/integration_tests/step_alias.rs
+++ b/tests/integration_tests/step_alias.rs
@@ -1851,3 +1851,29 @@ deploy = "echo deploying"
Some(&feature_path),
);
}
+
+/// Under `-v`, aliases print a table of resolved template variables before
+/// the announcement — symmetric with the hook-invocation verbose block, but
+/// with alias-scoped vars (`args` included, no `hook_*` keys).
+#[rstest]
+fn test_alias_verbose_prints_variable_table(mut repo: TestRepo) {
+ repo.write_test_config(
+ r#"
+[aliases]
+greet = "echo hello {{ args }}"
+"#,
+ );
+ let feature_path = repo.add_worktree("feature");
+
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = make_snapshot_cmd_with_global_flags(
+ &repo,
+ "greet",
+ &["world"],
+ Some(&feature_path),
+ &["-v"],
+ );
+ assert_cmd_snapshot!("alias_verbose_variable_table", cmd);
+ });
+}
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
index 286527dea..df9154b06 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
@@ -51,7 +51,7 @@ Usage: wt config approvals [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
index 1d559ebfd..5d6de4440 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals_add.snap
@@ -51,7 +51,7 @@ Usage: wt config approvals add [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap b/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
index 4d4c4c358..e26172494 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals_clear.snap
@@ -51,7 +51,7 @@ Usage: wt config approvals clear [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index c236d5347..dc0ccedb7 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -50,7 +50,7 @@ Usage: wt config create [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index c184661db..690bf2c1e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -58,7 +58,7 @@ Usage: wt config [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
index bb5666f27..5863eb58e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -47,7 +47,7 @@ Usage: wt config shell [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_short.snap b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
index 18ffad25b..0240378d1 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -50,7 +50,7 @@ Usage: wt config [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
index 2de02a9fd..51c8ecfb3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -60,7 +60,7 @@ Usage: wt config show [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state.snap b/tests/snapshots/integration__integration_tests__help__help_config_state.snap
index 3532cf6fc..5fc48dd39 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state.snap
@@ -58,7 +58,7 @@ Usage: wt config state [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
index fa8ce7a14..b04345866 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap
@@ -56,7 +56,7 @@ Usage: wt config state ci-status [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
index ab96b1f99..3a528da31 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_clear.snap
@@ -48,7 +48,7 @@ Usage: wt config state clear [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
index d22660000..8e377e003 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap
@@ -53,7 +53,7 @@ Usage: wt config state default-branch [OPTIONS] [COMM
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
index b3e08606d..73d8ac5f3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_get.snap
@@ -53,7 +53,7 @@ Usage: wt config state get [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
index b04998bd9..99285f1fb 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap
@@ -56,7 +56,7 @@ Usage: wt config state logs [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
index adfd2f9f4..8d0b324f8 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap
@@ -57,7 +57,7 @@ Usage: wt config state marker [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
index 45d80c345..032352070 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap
@@ -53,7 +53,7 @@ Usage: wt config state previous-branch [OPTIONS] [COM
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index bf1718308..317ce06fe 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -69,7 +69,7 @@ Usage: wt list [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
index 48393a927..0b542915c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
@@ -71,9 +71,9 @@ Usage: wt list [OPTIONS]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved
- template variables for each hook invocation; -vv: debug logs +
- diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output;
+ -vv: debug logs + diagnostic report + trace.log/output.log under
+ .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_short.snap b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
index 671263283..97b598bb6 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -49,7 +49,7 @@ Usage: wt list [OPTIONS]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
index 65aac4f8e..19009f863 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
@@ -92,7 +92,7 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_md_root.snap b/tests/snapshots/integration__integration_tests__help__help_md_root.snap
index 0ea90670f..ca40236ec 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_root.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_root.snap
@@ -57,7 +57,7 @@ Global Options:
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
index 8b0d8b07a..7238821df 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
@@ -92,7 +92,7 @@ Usage: wt merge [OPTIONS] [TARGET]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
index 943f46278..602d3ee31 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
@@ -53,7 +53,7 @@ Usage: wt merge [OPTIONS] [TARGET]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
index 20481408b..3d935d74b 100644
--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
@@ -48,7 +48,7 @@ Usage: wt [OPTIONS] [COMMAND]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
index d65211d49..b363693b6 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -81,7 +81,7 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
index aaab5087c..d3f21ac85 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
@@ -51,7 +51,7 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
index b565f9df6..19cb5187f 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
@@ -57,7 +57,7 @@ Usage: wt [OPTIONS] [COMMAND]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
index 25b9a3020..06d583cf9 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
@@ -49,7 +49,7 @@ Usage: wt [OPTIONS] [COMMAND]
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
index 5b413daf8..6c53e70ec 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
@@ -61,7 +61,7 @@ Usage: wt step [OPTIONS] <COMMAND>
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_promote.snap b/tests/snapshots/integration__integration_tests__help__help_step_promote.snap
index a89eb12a9..efdf76283 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_promote.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_promote.snap
@@ -55,7 +55,7 @@ Usage: wt step promote [OPTIONS] [BRANCH]
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
index 7ddf0e467..f06f8bb6a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
@@ -53,7 +53,7 @@ Usage: wt step [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index 1f30731b3..f0b4d0be0 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -113,7 +113,7 @@ Usage: wt switch [OPTIONS] [BRANCH] [--
User config file path
-v, --verbose...
- Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes
Skip approval prompts
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
index 27ebeb04b..59918dcf3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
@@ -57,7 +57,7 @@ Usage: wt switch [OPTIONS] [BRANCH] [--
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__step_alias__alias_verbose_variable_table.snap b/tests/snapshots/integration__integration_tests__step_alias__alias_verbose_variable_table.snap
new file mode 100644
index 000000000..3d65c5c7c
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__step_alias__alias_verbose_variable_table.snap
@@ -0,0 +1,69 @@
+---
+source: tests/integration_tests/step_alias.rs
+info:
+ program: wt
+ args:
+ - "-v"
+ - greet
+ - world
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "500"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ NO_COLOR: ""
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ PSModulePath: ""
+ RUST_LOG: warn
+ SHELL: ""
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+○ template variables:
+  branch = feature
+  worktree_path = _REPO_.feature
+  worktree_name = repo.feature
+  commit = 05a4a45d0b981dad5c27db59dca482836d59f89e
+  short_commit = 05a4a45
+  upstream = (unset)
+  args = ["world"]
+  repo = repo
+  repo_path = _REPO_
+  owner = (unset)
+  primary_worktree_path = _REPO_
+  default_branch = main
+  remote = origin
+  remote_url = ../origin.git
+  cwd = _REPO_.feature
+◎ Running alias greet
+○ Expanding greet
+  echo hello {{ args }}
+  →
+  echo hello world
+hello world
diff --git a/tests/snapshots/integration__integration_tests__step_alias__step_help_includes_aliases.snap b/tests/snapshots/integration__integration_tests__step_alias__step_help_includes_aliases.snap
index 3397fae6e..621daa58a 100644
--- a/tests/snapshots/integration__integration_tests__step_alias__step_help_includes_aliases.snap
+++ b/tests/snapshots/integration__integration_tests__step_alias__step_help_includes_aliases.snap
@@ -68,7 +68,7 @@ Usage: wt step [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__step_alias__step_list_no_aliases.snap b/tests/snapshots/integration__integration_tests__step_alias__step_list_no_aliases.snap
index 7c7250372..b22f12352 100644
--- a/tests/snapshots/integration__integration_tests__step_alias__step_list_no_aliases.snap
+++ b/tests/snapshots/integration__integration_tests__step_alias__step_list_no_aliases.snap
@@ -64,7 +64,7 @@ Usage: wt step [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__step_alias__step_list_with_aliases.snap b/tests/snapshots/integration__integration_tests__step_alias__step_list_with_aliases.snap
index ce2409bed..d75b3a576 100644
--- a/tests/snapshots/integration__integration_tests__step_alias__step_list_with_aliases.snap
+++ b/tests/snapshots/integration__integration_tests__step_alias__step_list_with_aliases.snap
@@ -69,7 +69,7 @@ Usage: wt step [OPTIONS] <COMMAND>
Global Options:
-C <path> Working directory for this command
--config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/template output + resolved template variables for each hook invocation; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variable & output; -vv: debug logs + diagnostic report + trace.log/output.log under .git/wt/logs/)
-y, --yes Skip approval prompts
----- stderr -----