Skip to content

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

Add `--config-set` for inline TOML config overrides (#3138)

Maximilian Roosa17fc22904f3
diff --git a/docs/content/config.md b/docs/content/config.md
index f2c35eda8..3df6e2060 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -586,6 +586,14 @@ Override the LLM command in CI to use a mock:
| `NO_COLOR` | Disable colored output ([standard](https://no-color.org/)) |
| `CLICOLOR_FORCE` | Force colored output even when not a TTY |
+## Inline config overrides (`--config-set`)
+
+`--config-set <toml>` overrides any user config key for a single invocation, with higher priority than both config files and `WORKTRUNK_` env vars. The value is a TOML fragment, so arrays and tables work directly; the flag is global (works before or after the subcommand), repeatable, and a later `--config-set` replaces an earlier one for the same key.
+
+{{ terminal(cmd="wt --config-set list.full=true list|||wt step copy-ignored --config-set 'step.copy-ignored.exclude=[__WT_QUOT__target__WT_QUOT__, __WT_QUOT__dist__WT_QUOT__]'") }}
+
+This composes with aliases — an alias body can invoke `wt --config-set … <command>` to render a named view without changing the saved config.
+
## Command reference
{% terminal() %}
@@ -616,6 +624,9 @@ Usage: <b><span class=c>wt config</span></b> <span class=c>[OPTIONS]</span> <spa
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -674,6 +685,9 @@ Usage: <b><span class=c>wt config show</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -725,6 +739,9 @@ Usage: <b><span class=c>wt config approvals</span></b> <span class=c>[OPTIONS]</
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -772,6 +789,9 @@ Usage: <b><span class=c>wt config alias</span></b> <span class=c>[OPTIONS]</span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -844,6 +864,9 @@ Usage: <b><span class=c>wt config state</span></b> <span class=c>[OPTIONS]</span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -904,6 +927,9 @@ Usage: <b><span class=c>wt config state cache</span></b> <span class=c>[OPTIONS]
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -968,6 +994,9 @@ Usage: <b><span class=c>wt config state default-branch</span></b> <span class=c>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1073,6 +1102,9 @@ Usage: <b><span class=c>wt config state logs</span></b> <span class=c>[OPTIONS]<
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1136,6 +1168,9 @@ Usage: <b><span class=c>wt config state ci-status</span></b> <span class=c>[OPTI
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1205,6 +1240,9 @@ Usage: <b><span class=c>wt config state marker</span></b> <span class=c>[OPTIONS
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1280,6 +1318,9 @@ Usage: <b><span class=c>wt config state vars</span></b> <span class=c>[OPTIONS]<
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/hook.md b/docs/content/hook.md
index af44c2587..b890e27d0 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -367,6 +367,9 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/list.md b/docs/content/list.md
index 243a2844d..d5ea17a59 100644
--- a/docs/content/list.md
+++ b/docs/content/list.md
@@ -361,6 +361,9 @@ Usage: <b><span class=c>wt list</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/merge.md b/docs/content/merge.md
index 3382a0f4a..e7a94682a 100644
--- a/docs/content/merge.md
+++ b/docs/content/merge.md
@@ -154,6 +154,9 @@ Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/remove.md b/docs/content/remove.md
index 3d1d0bf94..91a82eeab 100644
--- a/docs/content/remove.md
+++ b/docs/content/remove.md
@@ -137,6 +137,9 @@ Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <spa
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/step.md b/docs/content/step.md
index 87054132b..3142bbb77 100644
--- a/docs/content/step.md
+++ b/docs/content/step.md
@@ -82,6 +82,9 @@ Usage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -171,6 +174,9 @@ Usage: <b><span class=c>wt step commit</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -263,6 +269,9 @@ Usage: <b><span class=c>wt step squash</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -335,6 +344,9 @@ Usage: <b><span class=c>wt step diff</span></b> <span class=c>[OPTIONS]</span> <
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -485,6 +497,9 @@ Usage: <b><span class=c>wt step copy-ignored</span></b> <span class=c>[OPTIONS]<
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -574,6 +589,9 @@ Usage: <b><span class=c>wt step eval</span></b> <span class=c>[OPTIONS]</span> <
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -646,6 +664,9 @@ Usage: <b><span class=c>wt step for-each</span></b> <span class=c>[OPTIONS]</spa
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -723,6 +744,9 @@ Usage: <b><span class=c>wt step promote</span></b> <span class=c>[OPTIONS]</span
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -794,6 +818,9 @@ Usage: <b><span class=c>wt step prune</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -905,6 +932,9 @@ Usage: <b><span class=c>wt step relocate</span></b> <span class=c>[OPTIONS]</spa
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -976,6 +1006,9 @@ Usage: <b><span class=c>wt step tether</span></b> <span class=c>[OPTIONS]</span>
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/docs/content/switch.md b/docs/content/switch.md
index b1eb3ab34..42b82033b 100644
--- a/docs/content/switch.md
+++ b/docs/content/switch.md
@@ -217,6 +217,9 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spa
<b><span class=c>--config</span></b><span class=c> &lt;path&gt;</span>
User config file path
+ <b><span class=c>--config-set</span></b><span class=c> &lt;toml&gt;</span>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
<b><span class=c>-v</span></b>, <b><span class=c>--verbose</span></b><span class=c>...</span>
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 80af549de..3b377ba24 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -583,6 +583,17 @@ $ WORKTRUNK_COMMIT__GENERATION__COMMAND="echo 'test: automated commit'" wt merge
| `NO_COLOR` | Disable colored output ([standard](https://no-color.org/)) |
| `CLICOLOR_FORCE` | Force colored output even when not a TTY |
+## Inline config overrides (`--config-set`)
+
+`--config-set <toml>` overrides any user config key for a single invocation, with higher priority than both config files and `WORKTRUNK_` env vars. The value is a TOML fragment, so arrays and tables work directly; the flag is global (works before or after the subcommand), repeatable, and a later `--config-set` replaces an earlier one for the same key.
+
+```bash
+$ wt --config-set list.full=true list
+$ wt step copy-ignored --config-set 'step.copy-ignored.exclude=["target", "dist"]'
+```
+
+This composes with aliases — an alias body can invoke `wt --config-set … <command>` to render a named view without changing the saved config.
+
## Command reference
```
@@ -613,6 +624,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -673,6 +687,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -730,6 +747,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -784,6 +804,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -870,6 +893,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -934,6 +960,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1000,6 +1029,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1115,6 +1147,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1178,6 +1213,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1250,6 +1288,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1336,6 +1377,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index f37ed069f..c35660e53 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -363,6 +363,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/list.md b/skills/worktrunk/reference/list.md
index 586fdfdd9..cbddd5e1a 100644
--- a/skills/worktrunk/reference/list.md
+++ b/skills/worktrunk/reference/list.md
@@ -366,6 +366,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/merge.md b/skills/worktrunk/reference/merge.md
index 6003a64a8..be6e4633a 100644
--- a/skills/worktrunk/reference/merge.md
+++ b/skills/worktrunk/reference/merge.md
@@ -143,6 +143,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/remove.md b/skills/worktrunk/reference/remove.md
index 3994d08fc..e97f91eea 100644
--- a/skills/worktrunk/reference/remove.md
+++ b/skills/worktrunk/reference/remove.md
@@ -135,6 +135,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/step.md b/skills/worktrunk/reference/step.md
index 700e2d50e..44f827137 100644
--- a/skills/worktrunk/reference/step.md
+++ b/skills/worktrunk/reference/step.md
@@ -73,6 +73,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -166,6 +169,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -262,6 +268,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -346,6 +355,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -496,6 +508,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -591,6 +606,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -673,6 +691,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -753,6 +774,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -831,6 +855,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -950,6 +977,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
@@ -1025,6 +1055,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.md
index da04bac69..53b4ee152 100644
--- a/skills/worktrunk/reference/switch.md
+++ b/skills/worktrunk/reference/switch.md
@@ -212,6 +212,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug
logs and raw subprocess output written to .git/wt/logs/)
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 5f2830e12..374510ca1 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -257,13 +257,23 @@ pub(crate) struct Cli {
)]
pub config: Option<std::path::PathBuf>,
+ /// Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ #[arg(
+ long = "config-set",
+ global = true,
+ value_name = "toml",
+ display_order = 102,
+ help_heading = "Global Options"
+ )]
+ pub config_override: Vec<String>,
+
/// Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
#[arg(
long,
short = 'v',
global = true,
action = clap::ArgAction::Count,
- display_order = 102,
+ display_order = 103,
help_heading = "Global Options"
)]
pub verbose: u8,
@@ -273,7 +283,7 @@ pub(crate) struct Cli {
long,
short = 'y',
global = true,
- display_order = 103,
+ display_order = 104,
help_heading = "Global Options"
)]
pub yes: bool,
@@ -2229,6 +2239,17 @@ $ WORKTRUNK_COMMIT__GENERATION__COMMAND="echo 'test: automated commit'" wt merge
| `WORKTRUNK_MAX_CONCURRENT_COMMANDS` | Max parallel git commands (default: 32). Lower if hitting file descriptor limits. |
| `NO_COLOR` | Disable colored output ([standard](https://no-color.org/)) |
| `CLICOLOR_FORCE` | Force colored output even when not a TTY |
+
+## Inline config overrides (`--config-set`)
+
+`--config-set <toml>` overrides any user config key for a single invocation, with higher priority than both config files and `WORKTRUNK_` env vars. The value is a TOML fragment, so arrays and tables work directly; the flag is global (works before or after the subcommand), repeatable, and a later `--config-set` replaces an earlier one for the same key.
+
+```console
+$ wt --config-set list.full=true list
+$ wt step copy-ignored --config-set 'step.copy-ignored.exclude=["target", "dist"]'
+```
+
+This composes with aliases — an alias body can invoke `wt --config-set … <command>` to render a named view without changing the saved config.
<!-- subdoc: show -->
<!-- subdoc: approvals -->
<!-- subdoc: alias -->
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 43132c90a..851d53ce1 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -164,8 +164,8 @@ pub use user::{
CommitConfig, CommitGenerationConfig, CopyIgnoredConfig, ListColumnConfig, ListConfig,
MergeConfig, RemoveConfig, ResolvedConfig, StageMode, StepConfig, SwitchConfig,
SwitchPickerConfig, UserConfig, UserProjectOverrides, config_path, default_config_path,
- default_system_config_path, require_config_path, set_config_path, system_config_path,
- valid_user_config_keys,
+ default_system_config_path, require_config_path, set_config_overrides, set_config_path,
+ system_config_path, valid_user_config_keys,
};
#[cfg(test)]
diff --git a/src/config/user/mod.rs b/src/config/user/mod.rs
index c84aa2895..4f09cbb6c 100644
--- a/src/config/user/mod.rs
+++ b/src/config/user/mod.rs
@@ -14,11 +14,33 @@ mod sections;
mod tests;
use std::path::{Path, PathBuf};
+use std::sync::OnceLock;
use super::ConfigError;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
+/// Inline config overrides from the CLI `--config-set <toml>` flag, in
+/// invocation order.
+///
+/// Set once from `main` after arg parsing (mirroring [`set_config_path`]) and
+/// applied by [`UserConfig::load_with_warnings`] as the highest-priority layer,
+/// above config files and `WORKTRUNK_*` env vars. Each entry is an independent
+/// TOML fragment (e.g. `list.full = true`); later entries replace earlier ones
+/// for the same key.
+static CONFIG_OVERRIDES: OnceLock<Vec<String>> = OnceLock::new();
+
+/// Record the CLI `--config-set` overrides (called once from the
+/// `--config-set` flag in `main`).
+pub fn set_config_overrides(overrides: Vec<String>) {
+ CONFIG_OVERRIDES.set(overrides).ok();
+}
+
+/// The CLI `--config-set` overrides, empty when the flag was not used.
+fn cli_config_overrides() -> &'static [String] {
+ CONFIG_OVERRIDES.get().map_or(&[], Vec::as_slice)
+}
+
// Re-export public types
pub use merge::Merge;
pub use path::{
@@ -56,6 +78,10 @@ pub enum LoadError {
err: String,
vars: Vec<(String, String)>,
},
+ /// Lower layers loaded cleanly; applying CLI `--config-set` overrides
+ /// failed — either a fragment was not valid TOML or the merged result no
+ /// longer deserializes. `overrides` lists the raw values for attribution.
+ CliOverride { err: String, overrides: Vec<String> },
/// Validation errors (e.g. empty worktree-path).
Validation(String),
}
@@ -71,6 +97,7 @@ impl std::fmt::Display for LoadError {
)
}
LoadError::Env { err, .. } => write!(f, "{err}"),
+ LoadError::CliOverride { err, .. } => write!(f, "{err}"),
LoadError::Validation(err) => write!(f, "{err}"),
}
}
@@ -460,30 +487,21 @@ impl UserConfig {
);
}
- // 3. Env-var overrides (highest priority)
+ // 3. Env-var overrides (override config files)
let env_vars = parse_worktrunk_env_vars();
-
- if env_vars.is_empty() {
- return Self::finalize(merged_table, warnings);
- }
-
- // Resolve each env var's type independently: probe typed form against
- // the file table, fall back to string if typed doesn't fit the target
- // field. This handles mixed cases (e.g., WORKTRUNK__LIST__TIMEOUT_MS=100
- // needs Integer for u64, WORKTRUNK_WORKTREE_PATH=42 needs String).
- let file_table = merged_table.clone();
- let env_overlay = resolve_env_overlay(&file_table, &env_vars);
- deep_merge_table(&mut merged_table, env_overlay);
-
- match toml::Value::Table(merged_table).try_into::<Self>() {
- Ok(config) => match config.validate() {
- Ok(()) => (config, warnings),
- Err(e) => {
- warnings.push(LoadError::Validation(e.0));
- (Self::default(), warnings)
- }
- },
- Err(err) => {
+ if !env_vars.is_empty() {
+ // Resolve each env var's type independently: probe typed form against
+ // the file table, fall back to string if typed doesn't fit the target
+ // field. This handles mixed cases (e.g., WORKTRUNK__LIST__TIMEOUT_MS=100
+ // needs Integer for u64, WORKTRUNK_WORKTREE_PATH=42 needs String).
+ let file_table = merged_table.clone();
+ let env_overlay = resolve_env_overlay(&file_table, &env_vars);
+ deep_merge_table(&mut merged_table, env_overlay);
+
+ // Env overlay broke deserialization — fall back to file-only config.
+ // Each file was individually validated by load_config_file(), so the
+ // merged table should deserialize cleanly.
+ if let Err(err) = toml::Value::Table(merged_table.clone()).try_into::<Self>() {
warnings.push(LoadError::Env {
err: err.to_string(),
vars: env_vars
@@ -491,13 +509,67 @@ impl UserConfig {
.map(|v| (v.name.clone(), v.raw_value.clone()))
.collect(),
});
- // Env overlay broke deserialization — fall back to file-only config.
- // Each file was individually validated by load_config_file(), so the
- // merged table should deserialize cleanly. If it doesn't, finalize()
- // falls back to defaults.
- Self::finalize(file_table, warnings)
+ merged_table = file_table;
}
}
+
+ // 4. CLI `--config-set` overrides (override env vars and config files)
+ Self::apply_cli_overrides(cli_config_overrides(), &mut merged_table, &mut warnings);
+
+ Self::finalize(merged_table, warnings)
+ }
+
+ /// Apply CLI `--config-set <toml>` overrides as the highest-priority layer.
+ ///
+ /// Each override is an independent TOML fragment merged in order, so a
+ /// later override replaces an earlier one for the same key. Scalars and
+ /// arrays replace the lower-layer value, while nested tables deep-merge
+ /// (via [`deep_merge_table`]) so sibling keys survive —
+ /// `--config-set list.full=true` leaves `list.branches` untouched.
+ ///
+ /// The whole layer degrades as a unit: if any fragment fails to parse, or
+ /// the merged result fails to deserialize or validate, every override is
+ /// dropped and a [`LoadError::CliOverride`] is recorded, so a bad override
+ /// never silently corrupts (or wipes) the lower layers.
+ fn apply_cli_overrides(
+ overrides: &[String],
+ merged_table: &mut toml::Table,
+ warnings: &mut Vec<LoadError>,
+ ) {
+ if overrides.is_empty() {
+ return;
+ }
+
+ let base = merged_table.clone();
+ for raw in overrides {
+ match raw.parse::<toml::Table>() {
+ Ok(fragment) => deep_merge_table(merged_table, fragment),
+ Err(err) => {
+ warnings.push(LoadError::CliOverride {
+ err: err.to_string(),
+ overrides: overrides.to_vec(),
+ });
+ *merged_table = base;
+ return;
+ }
+ }
+ }
+
+ // Probe deserialize *and* validate, so a semantically-invalid override
+ // (e.g. an empty worktree-path) drops just this layer rather than
+ // falling through to finalize(), which would wipe the lower layers to
+ // defaults.
+ let probe = match toml::Value::Table(merged_table.clone()).try_into::<Self>() {
+ Ok(config) => config.validate().map_err(|e| e.0),
+ Err(err) => Err(err.to_string()),
+ };
+ if let Err(err) = probe {
+ warnings.push(LoadError::CliOverride {
+ err,
+ overrides: overrides.to_vec(),
+ });
+ *merged_table = base;
+ }
}
/// Deserialize a merged table into `UserConfig`, validate, and collect
diff --git a/src/config/user/tests.rs b/src/config/user/tests.rs
index 8e8fe0281..817c6e7f8 100644
--- a/src/config/user/tests.rs
+++ b/src/config/user/tests.rs
@@ -2450,6 +2450,119 @@ fn test_load_error_display_validation() {
assert_eq!(err.to_string(), "bad");
}
+#[test]
+fn test_load_error_display_cli_override() {
+ let err = LoadError::CliOverride {
+ err: "invalid type".into(),
+ overrides: vec!["list.full = \"x\"".into()],
+ };
+ assert_eq!(err.to_string(), "invalid type");
+}
+
+// =========================================================================
+// apply_cli_overrides() — CLI `--config-set` config layer
+// =========================================================================
+
+/// Apply `--config-set` overrides to a base table the way `load_with_warnings`
+/// does, returning the merged table plus any warnings.
+fn apply_overrides(base: toml::Table, overrides: &[&str]) -> (toml::Table, Vec<LoadError>) {
+ let overrides: Vec<String> = overrides.iter().map(|s| s.to_string()).collect();
+ let mut table = base;
+ let mut warnings = Vec::new();
+ UserConfig::apply_cli_overrides(&overrides, &mut table, &mut warnings);
+ (table, warnings)
+}
+
+#[test]
+fn test_cli_override_sets_value() {
+ let (table, warnings) = apply_overrides(toml::Table::new(), &["list.full = true"]);
+ assert!(warnings.is_empty());
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.list.full, Some(true));
+}
+
+#[test]
+fn test_cli_override_deep_merges_preserving_siblings() {
+ // Overriding one key in a section must not wipe sibling keys from a
+ // lower layer.
+ let base: toml::Table = "[list]\nbranches = true\n".parse().unwrap();
+ let (table, warnings) = apply_overrides(base, &["list.full = true"]);
+ assert!(warnings.is_empty());
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.list.full, Some(true));
+ assert_eq!(config.list.branches, Some(true)); // preserved
+}
+
+#[test]
+fn test_cli_override_repeated_key_last_wins() {
+ // Repeated `--config-set` of the same key replaces (does not accumulate).
+ let (table, warnings) = apply_overrides(
+ toml::Table::new(),
+ &["list.full = false", "list.full = true"],
+ );
+ assert!(warnings.is_empty());
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.list.full, Some(true));
+}
+
+#[test]
+fn test_cli_override_array_replaces_not_appends() {
+ // An array override replaces the lower-layer array wholesale.
+ let base: toml::Table = "[step.copy-ignored]\nexclude = [\"a\", \"b\"]\n"
+ .parse()
+ .unwrap();
+ let (table, warnings) = apply_overrides(base, &["step.copy-ignored.exclude = [\"x\"]"]);
+ assert!(warnings.is_empty());
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.step.copy_ignored().exclude, vec!["x".to_string()]);
+}
+
+#[test]
+fn test_cli_override_malformed_fragment_drops_layer() {
+ // A non-TOML fragment warns and leaves lower layers untouched — the whole
+ // `--config-set` layer rolls back, including the valid earlier fragment.
+ let base: toml::Table = "[list]\nbranches = true\n".parse().unwrap();
+ let (table, warnings) = apply_overrides(base, &["list.full = true", "garbage"]);
+ assert_eq!(warnings.len(), 1);
+ assert!(matches!(&warnings[0], LoadError::CliOverride { .. }));
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.list.full, None);
+ assert_eq!(config.list.branches, Some(true)); // base preserved
+}
+
+#[test]
+fn test_cli_override_type_mismatch_drops_layer() {
+ // A fragment that parses as TOML but is the wrong type warns and rolls back.
+ let base: toml::Table = "[list]\nbranches = true\n".parse().unwrap();
+ let (table, warnings) = apply_overrides(base, &["list.full = \"notabool\""]);
+ assert_eq!(warnings.len(), 1);
+ assert!(matches!(&warnings[0], LoadError::CliOverride { .. }));
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.list.branches, Some(true)); // base preserved
+}
+
+#[test]
+fn test_cli_override_validation_failure_drops_layer() {
+ // A fragment that deserializes but fails validation (empty worktree-path)
+ // rolls back to the lower layers instead of wiping them — without the
+ // validate() probe this would fall through to finalize() and reset to
+ // defaults.
+ let base: toml::Table = "[list]\nbranches = true\n".parse().unwrap();
+ let (table, warnings) = apply_overrides(base, &["worktree-path = \"\""]);
+ assert_eq!(warnings.len(), 1);
+ assert!(matches!(&warnings[0], LoadError::CliOverride { .. }));
+ let config: UserConfig = toml::Value::Table(table).try_into().unwrap();
+ assert_eq!(config.worktree_path, None); // override rolled back
+ assert_eq!(config.list.branches, Some(true)); // base preserved
+}
+
+#[test]
+fn test_cli_override_empty_is_noop() {
+ let (table, warnings) = apply_overrides(toml::Table::new(), &[]);
+ assert!(warnings.is_empty());
+ assert!(table.is_empty());
+}
+
#[test]
fn test_try_parse_value() {
use super::try_parse_value;
diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rs
index 47573d0df..d4d18fd30 100644
--- a/src/git/repository/mod.rs
+++ b/src/git/repository/mod.rs
@@ -1541,6 +1541,19 @@ fn emit_user_config_warnings(warnings: &[LoadError]) {
crate::styling::format_with_gutter(err.trim(), None)
);
}
+ LoadError::CliOverride { err, overrides } => {
+ crate::styling::eprintln!(
+ "{}",
+ crate::styling::warning_message(format!(
+ "Ignoring --config-set overrides: {}",
+ overrides.join(", ")
+ ))
+ );
+ crate::styling::eprintln!(
+ "{}",
+ crate::styling::format_with_gutter(err.trim(), None)
+ );
+ }
LoadError::Validation(err) => {
crate::styling::eprintln!(
"{}",
diff --git a/src/main.rs b/src/main.rs
index 3ea01642c..cd8c9b1ae 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,7 +2,7 @@ use clap::FromArgMatches;
use clap::error::ErrorKind as ClapErrorKind;
use color_print::{ceprintln, cformat};
use std::process;
-use worktrunk::config::set_config_path;
+use worktrunk::config::{set_config_overrides, set_config_path};
use worktrunk::git::{
ErrorExt, Repository, WorktrunkError, current_or_recover, cwd_removed_hint, set_base_path,
};
@@ -726,8 +726,8 @@ fn parse_cli() -> Option<Cli> {
// The same early parse also tells us whether this is help for the top
// level or `wt step`, so the splice path in `augment_help` has no
// separate arg scanner.
- let (directory, config, alias_help_context) = parse_early_globals();
- apply_global_options(directory, config);
+ let (directory, config, config_overrides, alias_help_context) = parse_early_globals();
+ apply_global_options(directory, config, config_overrides);
// Handle --help with pager before clap processes it.
// Exits the process on a help/version/doc request; otherwise returns.
@@ -747,7 +747,11 @@ fn parse_cli() -> Option<Cli> {
Some(Cli::from_arg_matches(&matches).unwrap_or_else(|e| e.exit()))
}
-fn apply_global_options(directory: Option<std::path::PathBuf>, config: Option<std::path::PathBuf>) {
+fn apply_global_options(
+ directory: Option<std::path::PathBuf>,
+ config: Option<std::path::PathBuf>,
+ config_overrides: Vec<String>,
+) {
// Initialize base path from -C flag if provided
if let Some(path) = directory {
set_base_path(path);
@@ -757,11 +761,16 @@ fn apply_global_options(directory: Option<std::path::PathBuf>, config: Option<st
if let Some(path) = config {
set_config_path(path);
}
+
+ // Record any --config-set overrides for the config loader.
+ if !config_overrides.is_empty() {
+ set_config_overrides(config_overrides);
+ }
}
-/// Parse global options (`-C`, `--config`) and detect whether this invocation
-/// renders help that should include the configured aliases — in a single pass
-/// against the real `Cli` definition.
+/// Parse global options (`-C`, `--config`, `--config-set`) and detect whether this
+/// invocation renders help that should include the configured aliases — in a
+/// single pass against the real `Cli` definition.
///
/// Uses `ignore_errors(true)` so unknown args, missing values, and `--help`
/// don't abort parsing — we just read what matched. This lets `wt -C other
@@ -774,16 +783,21 @@ fn apply_global_options(directory: Option<std::path::PathBuf>, config: Option<st
fn parse_early_globals() -> (
Option<std::path::PathBuf>,
Option<std::path::PathBuf>,
+ Vec<String>,
Option<commands::HelpContext>,
) {
let cmd = cli::build_command()
.ignore_errors(true)
.disable_help_flag(true);
let Ok(matches) = cmd.try_get_matches_from(std::env::args_os()) else {
- return (None, None, None);
+ return (None, None, Vec::new(), None);
};
let directory = matches.get_one::<std::path::PathBuf>("directory").cloned();
let config = matches.get_one::<std::path::PathBuf>("config").cloned();
+ let config_overrides = matches
+ .get_many::<String>("config_override")
+ .map(|values| values.cloned().collect())
+ .unwrap_or_default();
// Top-level help: `wt --help` (or `-h`, or bare `wt` via `arg_required_else_help`)
// lands here with no subcommand matched. Step help: `wt step --help` (or
// `-h`, or bare `wt step`) matches `step` with nothing past it. Other
@@ -793,7 +807,7 @@ fn parse_early_globals() -> (
Some(("step", sub)) if sub.subcommand_name().is_none() => Some(commands::HelpContext::Step),
_ => None,
};
- (directory, config, alias_help_context)
+ (directory, config, config_overrides, alias_help_context)
}
fn init_command_log(command_line: &str) {
@@ -1043,6 +1057,7 @@ fn main() {
let Cli {
directory,
config,
+ config_override,
verbose,
yes,
command,
@@ -1050,7 +1065,7 @@ fn main() {
// Globals were already applied in `parse_cli` before help rendering;
// OnceLock makes this call a no-op, but keeping it avoids touching the
// existing destructure pattern.
- apply_global_options(directory.clone(), config);
+ apply_global_options(directory.clone(), config, config_override);
// Latch warning suppression for commands whose UX is broken by stderr
// noise — TUI pickers (`switch` without a branch, `select`) and
diff --git a/tests/integration_tests/list_config.rs b/tests/integration_tests/list_config.rs
index 774db6842..e61a609ca 100644
--- a/tests/integration_tests/list_config.rs
+++ b/tests/integration_tests/list_config.rs
@@ -49,7 +49,7 @@ branches = true
}
#[rstest]
-fn test_list_config_cli_override(repo: TestRepo) {
+fn test_list_config_branches_flag_overrides_file(repo: TestRepo) {
// Create a branch without a worktree
repo.run_git(&["branch", "feature"]);
@@ -522,6 +522,63 @@ fn test_list_config_env_override_validation_failure(repo: TestRepo) {
});
}
+/// A `--config-set` override is the highest-priority layer: it wins over the
+/// config file. A file that disables branch listing is overridden back on,
+/// surfacing the branch without a worktree.
+#[rstest]
+fn test_list_config_cli_override_beats_file(repo: TestRepo) {
+ fs::write(repo.test_config_path(), "[list]\nbranches = false\n").unwrap();
+ repo.run_git(&["branch", "feature"]);
+
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ cmd.args(["--config-set", "list.branches = true", "list"])
+ .current_dir(repo.root_path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// A malformed `--config-set` fragment warns (attributed to `--config-set`,
+/// listing the bad value) and leaves the file config intact — the branch is
+/// still listed.
+#[rstest]
+fn test_list_config_cli_override_malformed_warns_on_stderr(repo: TestRepo) {
+ fs::write(repo.test_config_path(), "[list]\nbranches = true\n").unwrap();
+ repo.run_git(&["branch", "feature"]);
+
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ cmd.args(["--config-set", "garbage", "list"])
+ .current_dir(repo.root_path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// `--config-set` is a `global` arg, so it applies in any position — including
+/// after the subcommand. Pins that `wt list --config-set …` is accepted (and
+/// takes effect: branch listing toggles on).
+#[rstest]
+fn test_list_config_cli_override_after_subcommand(repo: TestRepo) {
+ fs::write(repo.test_config_path(), "[list]\nbranches = false\n").unwrap();
+ repo.run_git(&["branch", "feature"]);
+
+ let settings = setup_snapshot_settings(&repo);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ cmd.args(["list", "--config-set", "list.branches = true"])
+ .current_dir(repo.root_path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
/// Bad values in non-section fields (projects, skip-*-prompt) must still be
/// attributed to the file, not to env vars.
#[rstest]
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 1971bf602..9ade3fb8e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_approvals.snap
@@ -52,6 +52,9 @@ Usage: wt config approvals [OPTIONS] <COMMAND>
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 feaafa2a5..a95e94d22 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
@@ -52,6 +52,9 @@ Usage: wt config approvals add [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 5ccae60e6..17c7fa393 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
@@ -52,6 +52,9 @@ Usage: wt config approvals clear [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 ab5a4454a..15cb6b5e9 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -51,6 +51,9 @@ Usage: wt config create [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 e44e6bc51..980808a22 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -59,6 +59,9 @@ Usage: wt config [OPTIONS] <COMMAND>
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
@@ -558,4 +561,13 @@ Override the LLM command in CI to use a mock:
NO_COLOR Disable colored output (standard)
CLICOLOR_FORCE Force colored output even when not a TTY
+Inline config overrides (--config-set)
+
+--config-set <toml> overrides any user config key for a single invocation, with higher priority than both config files and WORKTRUNK_ env vars. The value is a TOML fragment, so arrays and tables work directly; the flag is global (works before or after the subcommand), repeatable, and a later --config-set replaces an earlier one for the same key.
+
+  wt --config-set list.full=true list
+  wt step copy-ignored --config-set 'step.copy-ignored.exclude=["target", "dist"]'
+
+This composes with aliases — an alias body can invoke wt --config-set … <command> to render a named view without changing the saved config.
+
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_plugins.snap b/tests/snapshots/integration__integration_tests__help__help_config_plugins.snap
index 4dbee87d0..e1c5ba421 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_plugins.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_plugins.snap
@@ -53,6 +53,9 @@ Usage: wt config plugins [OPTIONS] <COMMAND>
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex.snap b/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex.snap
index 043166b73..464ec252e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex.snap
@@ -53,6 +53,9 @@ Usage: wt config plugins codex [OPTIONS] <COMMAND>[0
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex_install.snap b/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex_install.snap
index 09cde5d26..adc1f341a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex_install.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_plugins_codex_install.snap
@@ -50,6 +50,9 @@ Usage: wt config plugins codex install [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 1cdb18b86..66c37def3 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_shell.snap
@@ -47,9 +47,10 @@ Usage: wt config shell [OPTIONS] <COMMAND>
-h, --help Print help
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 7974e8323..6048f4895 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_short.snap
@@ -50,9 +50,10 @@ Usage: wt config [OPTIONS] <COMMAND>
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 2326d061a..8e1e79823 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap
@@ -58,6 +58,9 @@ Usage: wt config show [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 63120ce67..79c339ace 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state.snap
@@ -57,6 +57,9 @@ Usage: wt config state [OPTIONS] <COMMAND>
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap
index 439b3ea7d..c73fd5542 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_cache.snap
@@ -57,6 +57,9 @@ Usage: wt config state cache [OPTIONS] [COMMAND]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 8595f8744..037e9a853 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
@@ -57,6 +57,9 @@ Usage: wt config state ci-status [OPTIONS] [COMMAND]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 69c3cc931..a65a36d89 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
@@ -49,6 +49,9 @@ Usage: wt config state clear [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 6c020246e..7ce088ff4 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
@@ -54,6 +54,9 @@ Usage: wt config state default-branch [OPTIONS] [COMM
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 93699a561..ee5c8a9b1 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
@@ -55,6 +55,9 @@ Usage: wt config state get [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 3b4605435..015aa8c41 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
@@ -57,6 +57,9 @@ Usage: wt config state logs [OPTIONS] [COMMAND]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 b13732449..7f098b034 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
@@ -58,6 +58,9 @@ Usage: wt config state marker [OPTIONS] [COMMAND]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 b2302ed87..09055cec1 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
@@ -54,6 +54,9 @@ Usage: wt config state previous-branch [OPTIONS] [COM
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 94e481ec1..340a4e495 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -71,6 +71,9 @@ Usage: wt list [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 ef6e1c61f..a7808d5ae 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
@@ -73,6 +73,10 @@ Usage: wt list [OPTIONS]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true
+ (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on
stderr; -vv: also debug logs and raw subprocess output written to
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 6d097a790..bf7202529 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_short.snap
@@ -49,9 +49,10 @@ Usage: wt list [OPTIONS]
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 598b40488..a85aa66d5 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap
@@ -90,6 +90,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 adf7d07f2..8bedf314e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_md_root.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_md_root.snap
@@ -58,6 +58,9 @@ Global Options:
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 4295bb92e..5d57b40eb 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap
@@ -90,6 +90,9 @@ Usage: wt merge [OPTIONS] [TARGET]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 718947a63..798974f7e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_merge_short.snap
@@ -53,9 +53,10 @@ Usage: wt merge [OPTIONS] [TARGET]
--format <FORMAT> Output format [default: text] [possible values: text, json]
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 00c388372..ba39db4ce 100644
--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap
@@ -48,9 +48,10 @@ Usage: wt [OPTIONS] [COMMAND]
-V, --version Print version
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 080c6d3b0..833a1ca27 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap
@@ -79,6 +79,9 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 f0fa0a80e..237b636aa 100644
--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap
@@ -51,9 +51,10 @@ Usage: wt remove [OPTIONS] [BRANCHES]...
--format <FORMAT> Output format [default: text] [possible values: text, json]
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 6342b77cb..8aae6836f 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap
@@ -58,6 +58,9 @@ Usage: wt [OPTIONS] [COMMAND]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 dc44b3a78..86fcf7022 100644
--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap
@@ -49,9 +49,10 @@ Usage: wt [OPTIONS] [COMMAND]
-V, --version Print version
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 ed86985a3..d7dd7b63e 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap
@@ -63,6 +63,9 @@ Usage: wt step [OPTIONS] <COMMAND>
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 8139adbdc..17c29c227 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_promote.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_promote.snap
@@ -56,6 +56,9 @@ Usage: wt step promote [OPTIONS] [BRANCH]
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 dd7f3dce8..2aa929d54 100644
--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap
@@ -54,9 +54,10 @@ Usage: wt step [OPTIONS] <COMMAND>
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 1ef10508a..bbb54c561 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
@@ -109,6 +109,9 @@ Usage: wt switch [OPTIONS] [BRANCH] [--
--config <path>
User config file path
+ --config-set <toml>
+ Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+
-v, --verbose...
Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
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 2f7912aec..d089cc0be 100644
--- a/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_switch_short.snap
@@ -57,9 +57,10 @@ Usage: wt switch [OPTIONS] [BRANCH] [--
--format <FORMAT> Output format [default: text] [possible values: text, json]
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
+ -y, --yes Skip approval prompts
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_branches_flag_overrides_file.snap
similarity index 100%
rename from tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap
rename to tests/snapshots/integration__integration_tests__list_config__list_config_branches_flag_overrides_file.snap
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_after_subcommand.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_after_subcommand.snap
new file mode 100644
index 000000000..fbd648912
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_after_subcommand.snap
@@ -0,0 +1,57 @@
+---
+source: tests/integration_tests/list_config.rs
+info:
+ program: wt
+ args:
+ - list
+ - "--config-set"
+ - list.branches = true
+ 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_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ Remote⇅ Path Commit Age Message
+@ main ^| | . 05a4a45d 16h Initial commit
++ feature-a ↑ ↑1 ../repo.feature-a 1b87d473 16h Add feature-a file
++ feature-b ↑ ↑1 ../repo.feature-b f62940fc 16h Add feature-b file
++ feature-c ↑ ↑1 ../repo.feature-c 345c7c93 16h Add feature-c file
+/ feature /_ 05a4a45d 16h Initial commit
+
+○ Showing 4 worktrees, 1 branches, 3 ahead
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_beats_file.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_beats_file.snap
new file mode 100644
index 000000000..2cee0d325
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_beats_file.snap
@@ -0,0 +1,57 @@
+---
+source: tests/integration_tests/list_config.rs
+info:
+ program: wt
+ args:
+ - "-c"
+ - list.branches = true
+ - list
+ 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_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ Remote⇅ Path Commit Age Message
+@ main ^| | . 05a4a45d 16h Initial commit
++ feature-a ↑ ↑1 ../repo.feature-a 1b87d473 16h Add feature-a file
++ feature-b ↑ ↑1 ../repo.feature-b f62940fc 16h Add feature-b file
++ feature-c ↑ ↑1 ../repo.feature-c 345c7c93 16h Add feature-c file
+/ feature /_ 05a4a45d 16h Initial commit
+
+○ Showing 4 worktrees, 1 branches, 3 ahead
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_malformed_warns_on_stderr.snap b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_malformed_warns_on_stderr.snap
new file mode 100644
index 000000000..0358b06db
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__list_config__list_config_cli_override_malformed_warns_on_stderr.snap
@@ -0,0 +1,63 @@
+---
+source: tests/integration_tests/list_config.rs
+info:
+ program: wt
+ args:
+ - "--config-set"
+ - garbage
+ - list
+ 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_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"
+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
+ PATH: "[PATH]"
+ TERM: alacritty
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
+ WORKTRUNK_TEST_BASH_INSTALLED: "0"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"
+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
+ WORKTRUNK_TEST_EPOCH: "1735776000"
+ WORKTRUNK_TEST_FISH_INSTALLED: "0"
+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"
+ WORKTRUNK_TEST_NUSHELL_ENV: "0"
+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"
+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"
+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+ Branch Status HEAD± main↕ Remote⇅ Path Commit Age Message
+@ main ^| | . 05a4a45d 16h Initial commit
++ feature-a ↑ ↑1 ../repo.feature-a 1b87d473 16h Add feature-a file
++ feature-b ↑ ↑1 ../repo.feature-b f62940fc 16h Add feature-b file
++ feature-c ↑ ↑1 ../repo.feature-c 345c7c93 16h Add feature-c file
+/ feature /_ 05a4a45d 16h Initial commit
+
+○ Showing 4 worktrees, 1 branches, 3 ahead
+
+----- stderr -----
+▲ Ignoring --config-set overrides: garbage
+  TOML parse error at line 1, column 8
+  |
+  1 | garbage
+  | ^
+  key with no value, expected `=`
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 4aa27e1eb..52ce5150f 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
@@ -71,9 +71,10 @@ Run wt config alias show for the full definitions.
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 9d5b76f40..5663be754 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
@@ -65,9 +65,10 @@ Usage: wt step [OPTIONS] <COMMAND>
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .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 4e3b54baf..d625eb37d 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
@@ -70,9 +70,10 @@ Run wt config alias show for the full definitions.
-h, --help Print help (see more with '--help')
Global Options:
- -C <path> Working directory for this command
- --config <path> User config file path
- -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
- -y, --yes Skip approval prompts
+ -C <path> Working directory for this command
+ --config <path> User config file path
+ --config-set <toml> Override config with inline TOML, e.g. --config-set list.full=true (repeatable)
+ -v, --verbose... Verbose output (-v: info logs + hook/alias template variables on stderr; -vv: also debug logs and raw subprocess output written to .git/wt/logs/)
+ -y, --yes Skip approval prompts
----- stderr -----