Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
refactor: Remove colon in hook command output
Maximilian Roos53e6a62c7f57
diff --git a/README.md b/README.mdindex 40a1c9955..fadf41817 100644--- a/README.md+++ b/README.md@@ -344,13 +344,13 @@ $ wt merge- Create test suite covering all authentication flowsβ Squashed @ a1b2c3d-π Running pre-merge: lint+π Running pre-merge lintcargo clippyChecking worktrunk v0.1.0Finished dev [unoptimized + debuginfo] target(s) in 1.23s-π Running pre-merge: test+π Running pre-merge testcargo testFinished test [unoptimized + debuginfo] target(s) in 0.12s@@ -376,7 +376,7 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finβ Merged to main (1 commit, 3 files, +3)β Returned to primary at ../repo/π Removing worktree & branch...-π Running post-merge: install+π Running post-merge installcargo install --path .Installing worktrunk v0.1.0diff --git a/src/commands/mod.rs b/src/commands/mod.rsindex 2040daf4f..99df33740 100644--- a/src/commands/mod.rs+++ b/src/commands/mod.rs@@ -38,7 +38,7 @@ pub use worktrunk::shell::Shell;/// Format command execution label with optional command name.////// Examples:-/// - `format_command_label("post-create", Some("install"))` β `"Running post-create: install"` (with bold)+/// - `format_command_label("post-create", Some("install"))` β `"Running post-create install"` (with bold)/// - `format_command_label("post-create", None)` β `"Running post-create"`pub fn format_command_label(command_type: &str, name: Option<&str>) -> String {use worktrunk::styling::AnstyleStyle;@@ -46,7 +46,7 @@ pub fn format_command_label(command_type: &str, name: Option<&str>) -> String {match name {Some(name) => {let bold = AnstyleStyle::new().bold();- format!("Running {command_type}: {bold}{name}{bold:#}")+ format!("Running {command_type} {bold}{name}{bold:#}")}None => format!("Running {command_type}"),}diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snapindex 604983f0a..83da391ca 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap@@ -2,7 +2,7 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized()----π [36mRunning pre-merge: [1mcheck1[0m:[0m+π [36mRunning pre-merge [1mcheck1[0m:[0m[40m [0m [1m[34m[WORKSPACE]/tests/fixtures/mixed-output.sh[0m check1 3[0m[check1] stdout line 1@@ -14,7 +14,7 @@ expression: output.normalized()[check1] stdout complete[check1] stderr complete-π [36mRunning pre-merge: [1mcheck2[0m:[0m+π [36mRunning pre-merge [1mcheck2[0m:[0m[40m [0m [1m[34m[WORKSPACE]/tests/fixtures/mixed-output.sh[0m check2 3[0m[check2] stdout line 1diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snapindex 3708bcd6c..07fba04a8 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap@@ -18,11 +18,11 @@ expression: output.normalized()[check2] stderr line 3[check2] stdout complete[check2] stderr complete-π [36mRunning pre-merge: [1mcheck1[0m:[0m+π [36mRunning pre-merge [1mcheck1[0m:[0m[40m [0m [1m[34m[WORKSPACE]/tests/fixtures/mixed-output.sh[0m check1 3[0m-π [36mRunning pre-merge: [1mcheck2[0m:[0m+π [36mRunning pre-merge [1mcheck2[0m:[0m[40m [0m [1m[34m[WORKSPACE]/tests/fixtures/mixed-output.sh[0m check2 3[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snapindex 6680cc01a..83549bb2e 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap@@ -2,12 +2,12 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized()----π [36mRunning pre-merge: [1mformat[0m:[0m+π [36mRunning pre-merge [1mformat[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Code formatting check passed'[0m[0mβ Code formatting check passed-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Test suite failed: 3 tests failing'[0m [36m&&[0m [1m[34mexit[0m 1[0mβ Test suite failed: 3 tests failingdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snapindex 5d99f1529..d4ea08734 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap@@ -9,9 +9,9 @@ expression: output.normalized()Command failed with exit code: exit status: 1π‘ [2mUse --no-hooks to skip pre-merge commands[0m-π [36mRunning pre-merge: [1mformat[0m:[0m+π [36mRunning pre-merge [1mformat[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Code formatting check passed'[0m[0m-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Test suite failed: 3 tests failing'[0m [36m&&[0m [1m[34mexit[0m 1[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snapindex 23caf51ac..238fc6b08 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap@@ -2,17 +2,17 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized()----π [36mRunning pre-merge: [1mformat[0m:[0m+π [36mRunning pre-merge [1mformat[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Code formatting check passed'[0m[0mβ Code formatting check passed-π [36mRunning pre-merge: [1mlint[0m:[0m+π [36mRunning pre-merge [1mlint[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Linting passed - no warnings'[0m[0mβ Linting passed - no warnings-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mecho[0m [32m'β All 47 tests passed in 2.3s'[0m[0mβ All 47 tests passed in 2.3sdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snapindex 33c51e4be..448ecefc2 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap@@ -5,15 +5,15 @@ expression: output.normalized()β Code formatting check passedβ Linting passed - no warningsβ All 47 tests passed in 2.3s-π [36mRunning pre-merge: [1mformat[0m:[0m+π [36mRunning pre-merge [1mformat[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Code formatting check passed'[0m[0m-π [36mRunning pre-merge: [1mlint[0m:[0m+π [36mRunning pre-merge [1mlint[0m:[0m[40m [0m [1m[34mecho[0m [32m'β Linting passed - no warnings'[0m[0m-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mecho[0m [32m'β All 47 tests passed in 2.3s'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snapindex a5cefa8c2..8979b77e1 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_bash.snap@@ -13,8 +13,8 @@ Installing dependencies...Building project...β [32mCreated new worktree for [1m[32mfeature-hooks[0m[32m from [1m[32mmain[0m[32m: [1m[32m[TMPDIR]/test-repo.feature-hooks[0m[0m-π [36mRunning post-start: [1mserver[0m:[0m+π [36mRunning post-start [1mserver[0m:[0m[40m [0m [1m[34mecho[0m [32m'Starting dev server on port 3000'[0m[0m-π [36mRunning post-start: [1mwatch[0m:[0m+π [36mRunning post-start [1mwatch[0m:[0m[40m [0m [1m[34mecho[0m [32m'Watching for file changes'[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snapindex e1d3ae1e6..0a9640851 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap@@ -13,8 +13,8 @@ Building project...β [32mCreated new worktree for [1m[32mfeature-hooks[0m[32m from [1m[32mmain[0m[32m at [1m[32m[TMPDIR]/test-repo.feature-hooks[0m[0m-π [36mRunning post-start: [1mserver[0m:[0m+π [36mRunning post-start [1mserver[0m:[0m[40m [0m [1m[34mecho[0m [32m'Starting dev server on port 3000'[0m[0m-π [36mRunning post-start: [1mwatch[0m:[0m+π [36mRunning post-start [1mwatch[0m:[0m[40m [0m [1m[34mecho[0m [32m'Watching for file changes'[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snapindex df1c7b9c2..8dd9b7308 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap@@ -29,9 +29,9 @@ exit_code: 0β [32mMerged to [1m[32mmain[0m[0m (1 commit, 1 file, [32m+1[0m)π [36mRemoving worktree & branch...[0mβ [32mRemoved worktree & branch for [1m[32mfeature[0m[32m, returned to primary at [1m[32m[REPO][0m[0m-π [36mRunning post-merge: [1mnotify[0m:[0m+π [36mRunning post-merge [1mnotify[0m:[0m[40m [0m [1m[34mecho[0m [32m'Merge to main complete'[0m [36m>[0m notify.txt[0m-π [36mRunning post-merge: [1mdeploy[0m:[0m+π [36mRunning post-merge [1mdeploy[0m:[0m[40m [0m [1m[34mecho[0m [32m'Deploying branch feature'[0m [36m>[0m deploy.txt[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snapindex d29fa9e08..1081241fd 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap@@ -21,11 +21,11 @@ info:success: trueexit_code: 0----- stdout ------π [36mRunning pre-merge: [1mformat[0m:[0m+π [36mRunning pre-merge [1mformat[0m:[0m[40m [0m [1m[34mexit[0m 0[0m-π [36mRunning pre-merge: [1mlint[0m:[0m+π [36mRunning pre-merge [1mlint[0m:[0m[40m [0m [1m[34mexit[0m 0[0m-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mexit[0m 0[0mπ [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no commit/squash/rebase needed)diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snapindex e67b296bc..0a0539ef0 100644--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap@@ -34,9 +34,9 @@ exit_code: 0[40m [0m - Add JWT encoding/decoding with signature verification[40m [0m - Create test suite covering all authentication flowsβ [32mSquashed @ [2m[SHA][0m-π [36mRunning pre-merge: [1mtest[0m:[0m+π [36mRunning pre-merge [1mtest[0m:[0m[40m [0m [1m[34mcargo[0m test[0m-π [36mRunning pre-merge: [1mlint[0m:[0m+π [36mRunning pre-merge [1mlint[0m:[0m[40m [0m [1m[34mcargo[0m clippy[0mπ [36mMerging 1 commit to [1m[36mmain[0m[36m @ [2m[SHA][0m (no rebase needed)@@ -48,7 +48,7 @@ exit_code: 0β [32mMerged to [1m[32mmain[0m[0m (1 commit, 3 files, [32m+3[0m)π [36mRemoving worktree & branch...[0mβ [32mRemoved worktree & branch for [1m[32mfeature-auth[0m[32m, returned to primary at [1m[32m[REPO][0m[0m-π [36mRunning post-merge: [1minstall[0m:[0m+π [36mRunning post-merge [1minstall[0m:[0m[40m [0m [1m[34mcargo[0m install [36m--path[0m .[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snapindex a3370d138..998c052cb 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap@@ -26,7 +26,7 @@ exit_code: 0[40m [0m [1m[34mecho[0m [32m'Setup done'[0m [36m>[0m setup.txt[0mβ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0m-π [36mRunning post-start: [1mserver[0m:[0m+π [36mRunning post-start [1mserver[0m:[0m[40m [0m [1m[34msleep[0m 0.5 [36m&&[0m [1m[34mecho[0m [32m'Server running'[0m [36m>[0m server.txt[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snapindex ef269e791..fac5c552e 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap@@ -22,9 +22,9 @@ info:success: trueexit_code: 0----- stdout ------π [36mRunning post-create: [1minstall[0m:[0m+π [36mRunning post-create [1minstall[0m:[0m[40m [0m [1m[34mecho[0m [32m'Installing deps'[0m[0m-π [36mRunning post-create: [1msetup[0m:[0m+π [36mRunning post-create [1msetup[0m:[0m[40m [0m [1m[34mecho[0m [32m'Running setup'[0m[0mβ [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapindex 554545e84..78ddbedfe 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap@@ -24,9 +24,9 @@ exit_code: 0----- stdout -----β [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0m-π [36mRunning post-start: [1mtask1[0m:[0m+π [36mRunning post-start [1mtask1[0m:[0m[40m [0m [1m[34mecho[0m [32m'Task 1 running'[0m [36m>[0m task1.txt[0m-π [36mRunning post-start: [1mtask2[0m:[0m+π [36mRunning post-start [1mtask2[0m:[0m[40m [0m [1m[34mecho[0m [32m'Task 2 running'[0m [36m>[0m task2.txt[0m----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snapindex 8313428ee..3232c69e6 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap@@ -24,11 +24,11 @@ exit_code: 0----- stdout -----β [32mCreated new worktree for [1m[32mfeature[0m[32m from [1m[32mmain[0m[32m at [1m[32m[REPO].feature[0m[0mπ‘ [2mTo enable automatic cd, run: wt config shell[0m-π [36mRunning post-start: [1mtask1[0m:[0m+π [36mRunning post-start [1mtask1[0m:[0m[40m [0m [1m[34mecho[0m [32m'TASK1_OUTPUT'[0m[0m-π [36mRunning post-start: [1mtask2[0m:[0m+π [36mRunning post-start [1mtask2[0m:[0m[40m [0m [1m[34mecho[0m [32m'TASK2_OUTPUT'[0m[0m-π [36mRunning post-start: [1mtask3[0m:[0m+π [36mRunning post-start [1mtask3[0m:[0m[40m [0m [1m[34mecho[0m [32m'TASK3_OUTPUT'[0m[0m----- stderr -----