Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(docs): use __WT_QUOT__ placeholder in tips-patterns terminal blocks (#2496)
Worktrunk Bot735756a46a34
diff --git a/docs/content/tips-patterns.md b/docs/content/tips-patterns.mdindex 142f6d343..32b363ced 100644--- a/docs/content/tips-patterns.md+++ b/docs/content/tips-patterns.md@@ -170,7 +170,7 @@ Custom emoji markers show agent state in `wt list`. The [Claude Code](@/claude-cSet status manually for any workflow:-{{ terminal(cmd="wt config state marker set "π§" # Current branch|||wt config state marker set "β " --branch feature # Specific branch|||git config worktrunk.state.feature.marker '{"marker":"π¬","set_at":0}' # Direct") }}+{{ terminal(cmd="wt config state marker set __WT_QUOT__π§__WT_QUOT__ # Current branch|||wt config state marker set __WT_QUOT__β __WT_QUOT__ --branch feature # Specific branch|||git config worktrunk.state.feature.marker '{__WT_QUOT__marker__WT_QUOT__:__WT_QUOT__π¬__WT_QUOT__,__WT_QUOT__set_at__WT_QUOT__:0}' # Direct") }}See [Claude Code Integration](@/claude-code.md#installation) for plugin installation.@@ -265,7 +265,7 @@ Branch from current HEAD instead of the default branch:Spawn a worktree with an agent CLI running in the background. Examples below use `claude`; for OpenCode, replace `claude` with `'opencode run'`.**tmux** (new detached session):-{{ terminal(cmd="tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \||| 'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'"") }}+{{ terminal(cmd="tmux new-session -d -s fix-auth-bug __WT_QUOT__wt switch --create fix-auth-bug -x claude -- \||| 'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'__WT_QUOT__") }}**Zellij** (new pane in current session):{{ terminal(cmd="zellij run -- wt switch --create fix-auth-bug -x claude -- \||| 'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'") }}@@ -374,13 +374,13 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"Follow background hook output in real-time:-{{ terminal(cmd="tail -f "$(wt config state logs get --hook=user:post-start:server)"") }}+{{ terminal(cmd="tail -f __WT_QUOT__$(wt config state logs get --hook=user:post-start:server)__WT_QUOT__") }}The `--hook` format is `source:hook-type:name` β e.g., `project:post-start:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.Create an alias for frequent use:-{{ terminal(cmd="alias wtlog='f() { tail -f "$(wt config state logs get --hook="$1")"; }; f'") }}+{{ terminal(cmd="alias wtlog='f() { tail -f __WT_QUOT__$(wt config state logs get --hook=__WT_QUOT__$1__WT_QUOT__)__WT_QUOT__; }; f'") }}## Bare repository layoutdiff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.mdindex 1e7addd3e..e5c846819 100644--- a/skills/worktrunk/reference/tips-patterns.md+++ b/skills/worktrunk/reference/tips-patterns.md@@ -166,9 +166,9 @@ Custom emoji markers show agent state in `wt list`. The [Claude Code](https://woSet status manually for any workflow:```bash-wt config state marker set "π§" # Current branch-wt config state marker set "β " --branch feature # Specific branch-git config worktrunk.state.feature.marker '{"marker":"π¬","set_at":0}' # Direct+wt config state marker set "π§" # Current branch+wt config state marker set "β " --branch feature # Specific branch+git config worktrunk.state.feature.marker '{"marker":"π¬","set_at":0}' # Direct```See [Claude Code Integration](https://worktrunk.dev/claude-code/#installation) for plugin installation.@@ -277,8 +277,8 @@ Spawn a worktree with an agent CLI running in the background. Examples below use**tmux** (new detached session):```bash-tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \- 'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'"+tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \+ 'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'"```**Zellij** (new pane in current session):@@ -392,7 +392,7 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"Follow background hook output in real-time:```bash-tail -f "$(wt config state logs get --hook=user:post-start:server)"+tail -f "$(wt config state logs get --hook=user:post-start:server)"```The `--hook` format is `source:hook-type:name` β e.g., `project:post-start:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.@@ -400,7 +400,7 @@ The `--hook` format is `source:hook-type:name` β e.g., `project:post-start:buiCreate an alias for frequent use:```bash-alias wtlog='f() { tail -f "$(wt config state logs get --hook="$1")"; }; f'+alias wtlog='f() { tail -f "$(wt config state logs get --hook="$1")"; }; f'```## Bare repository layoutdiff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rsindex d574f8b96..72eb593cc 100644--- a/tests/integration_tests/readme_sync.rs+++ b/tests/integration_tests/readme_sync.rs@@ -2704,6 +2704,33 @@ fn test_no_nested_auto_generated_markers() {);}+/// `terminal(cmd=...)` shortcodes must use the `__WT_QUOT__` placeholder for+/// embedded double quotes β the terminal template substitutes that back to `"`+/// before Syntect highlighting. Raw `"` HTML entities pass through Tera+/// untouched and render literally in the docs site (see #2495).+#[test]+fn test_terminal_cmd_uses_wt_quot_placeholder() {+ let project_root = Path::new(env!("CARGO_MANIFEST_DIR"));+ let mut violations = Vec::new();+ for entry in fs::read_dir(project_root.join("docs/content")).unwrap() {+ let path = entry.unwrap().path();+ if path.extension().is_some_and(|e| e == "md") {+ let content = fs::read_to_string(&path).unwrap();+ for (i, line) in content.lines().enumerate() {+ if line.contains("terminal(cmd=") && line.contains(""") {+ violations.push(format!("{}:{}: {}", path.display(), i + 1, line.trim()));+ }+ }+ }+ }+ assert!(+ violations.is_empty(),+ "Found `"` inside terminal(cmd=...) shortcodes β these render \+ literally on the docs site. Replace with `__WT_QUOT__`.\n\n{}",+ violations.join("\n")+ );+}+/// The hand-authored `## Template variables` table in `src/cli/mod.rs` must/// match the variable constants in `src/config/expansion.rs`. Drift means the/// help docs lie about which vars hooks and aliases can reference.