Skip to content

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

Convert stray bash block to console convention in config docs (#1788)

Maximilian Roos29d762a05f40
diff --git a/docs/content/config.md b/docs/content/config.md
index d6d88d0b8..bfcacf1c8 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -576,9 +576,7 @@ Default branch detection and override.
Useful in scripts to avoid hardcoding `main` or `master`:
-```bash
-git rebase $(wt config state default-branch)
-```
+{{ terminal(cmd="git rebase $(wt config state default-branch)") }}
Without a subcommand, runs `get`. Use `set` to override, or `clear` then `get` to re-detect.
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 4b928024c..5e5ab03aa 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -588,7 +588,7 @@ Default branch detection and override.
Useful in scripts to avoid hardcoding `main` or `master`:
```bash
-git rebase $(wt config state default-branch)
+$ git rebase $(wt config state default-branch)
```
Without a subcommand, runs `get`. Use `set` to override, or `clear` then `get` to re-detect.
diff --git a/src/cli/config.rs b/src/cli/config.rs
index 031aa2b72..ca6b2361e 100644
--- a/src/cli/config.rs
+++ b/src/cli/config.rs
@@ -322,8 +322,8 @@ pub enum StateCommand {
name = "default-branch",
after_long_help = r#"Useful in scripts to avoid hardcoding `main` or `master`:
-```bash
-git rebase $(wt config state default-branch)
+```console
+$ git rebase $(wt config state default-branch)
```
Without a subcommand, runs `get`. Use `set` to override, or `clear` then `get` to re-detect.
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 13e6721de..06032f21c 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
@@ -58,7 +58,7 @@ Usage: wt config state default-branch [OPTIONS] [COMM
Useful in scripts to avoid hardcoding main or master:
-  git rebase $(wt config state default-branch)
+  $ git rebase $(wt config state default-branch)
Without a subcommand, runs get. Use set to override, or clear then get to re-detect.