Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs(extending): use --key=value shorthand in move/copy alias examples (#2094)
Maximilian Roos420cace354a5
diff --git a/docs/content/extending.md b/docs/content/extending.mdindex 8167cbb7e..98ab3a222 100644--- a/docs/content/extending.md+++ b/docs/content/extending.md@@ -139,16 +139,16 @@ Aliases compose existing commands into richer workflows. These three aliases wra[aliases]# Move all in-progress changes (staged + unstaged + untracked) to a new# worktree. Source becomes clean.-# wt step move-changes --var to=feature-xyz+# wt step move-changes --to=feature-xyzmove-changes = '''if git diff --quiet HEAD && test -z "$(git ls-files --others --exclude-standard)"; then wt switch --create {{ to }}; else git stash push --include-untracked --quiet && wt switch --create {{ to }} --execute='git stash pop --index'; fi'''# Copy all changes (staged + unstaged + untracked) to a new worktree.# Source is unchanged.-# wt step copy-changes --var to=feature-xyz+# wt step copy-changes --to=feature-xyzcopy-changes = '''if git diff --quiet HEAD && test -z "$(git ls-files --others --exclude-standard)"; then wt switch --create {{ to }}; else git stash push --include-untracked --quiet && git stash apply --index --quiet && wt switch --create {{ to }} --execute='git stash pop --index'; fi'''# Copy only staged changes to a new worktree. Source is unchanged.-# wt step copy-staged --var to=feature-xyz+# wt step copy-staged --to=feature-xyzcopy-staged = '''if git diff --cached --quiet; then wt switch --create {{ to }}; else p=$(mktemp) && git diff --cached > "$p" && wt switch --create {{ to }} --execute="git apply --index '$p' && rm '$p'"; fi'''```diff --git a/skills/worktrunk/reference/extending.md b/skills/worktrunk/reference/extending.mdindex 288ab7a5c..4733e38fa 100644--- a/skills/worktrunk/reference/extending.md+++ b/skills/worktrunk/reference/extending.md@@ -136,16 +136,16 @@ Aliases compose existing commands into richer workflows. These three aliases wra[aliases]# Move all in-progress changes (staged + unstaged + untracked) to a new# worktree. Source becomes clean.-# wt step move-changes --var to=feature-xyz+# wt step move-changes --to=feature-xyzmove-changes = '''if git diff --quiet HEAD && test -z "$(git ls-files --others --exclude-standard)"; then wt switch --create {{ to }}; else git stash push --include-untracked --quiet && wt switch --create {{ to }} --execute='git stash pop --index'; fi'''# Copy all changes (staged + unstaged + untracked) to a new worktree.# Source is unchanged.-# wt step copy-changes --var to=feature-xyz+# wt step copy-changes --to=feature-xyzcopy-changes = '''if git diff --quiet HEAD && test -z "$(git ls-files --others --exclude-standard)"; then wt switch --create {{ to }}; else git stash push --include-untracked --quiet && git stash apply --index --quiet && wt switch --create {{ to }} --execute='git stash pop --index'; fi'''# Copy only staged changes to a new worktree. Source is unchanged.-# wt step copy-staged --var to=feature-xyz+# wt step copy-staged --to=feature-xyzcopy-staged = '''if git diff --cached --quiet; then wt switch --create {{ to }}; else p=$(mktemp) && git diff --cached > "$p" && wt switch --create {{ to }} --execute="git apply --index '$p' && rm '$p'"; fi'''```