Skip to content

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.md
index 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 lint
cargo clippy
Checking worktrunk v0.1.0
Finished dev [unoptimized + debuginfo] target(s) in 1.23s
-πŸ”„ Running pre-merge: test
+πŸ”„ Running pre-merge test
cargo test
Finished 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 install
cargo install --path .
Installing worktrunk v0.1.0
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 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.snap
index 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.rs
expression: output.normalized()
---
-πŸ”„ Running pre-merge: check1:
+πŸ”„ Running pre-merge check1:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check1 3
[check1] stdout line 1
@@ -14,7 +14,7 @@ expression: output.normalized()
[check1] stdout complete
[check1] stderr complete
-πŸ”„ Running pre-merge: check2:
+πŸ”„ Running pre-merge check2:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check2 3
[check2] stdout line 1
diff --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.snap
index 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
-πŸ”„ Running pre-merge: check1:
+πŸ”„ Running pre-merge check1:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check1 3
-πŸ”„ Running pre-merge: check2:
+πŸ”„ Running pre-merge check2:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check2 3
diff --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.snap
index 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.rs
expression: output.normalized()
---
-πŸ”„ Running pre-merge: format:
+πŸ”„ Running pre-merge format:
  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
βœ— Test suite failed: 3 tests failing
diff --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.snap
index 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
πŸ’‘ Use --no-hooks to skip pre-merge commands
-πŸ”„ Running pre-merge: format:
+πŸ”„ Running pre-merge format:
  echo 'βœ“ Code formatting check passed'
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  echo 'βœ— Test suite failed: 3 tests failing' && exit 1
diff --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.snap
index 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.rs
expression: output.normalized()
---
-πŸ”„ Running pre-merge: format:
+πŸ”„ Running pre-merge format:
  echo 'βœ“ Code formatting check passed'
βœ“ Code formatting check passed
-πŸ”„ Running pre-merge: lint:
+πŸ”„ Running pre-merge lint:
  echo 'βœ“ Linting passed - no warnings'
βœ“ Linting passed - no warnings
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  echo 'βœ“ All 47 tests passed in 2.3s'
βœ“ All 47 tests passed in 2.3s
diff --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.snap
index 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
-πŸ”„ Running pre-merge: format:
+πŸ”„ Running pre-merge format:
  echo 'βœ“ Code formatting check passed'
-πŸ”„ Running pre-merge: lint:
+πŸ”„ Running pre-merge lint:
  echo 'βœ“ Linting passed - no warnings'
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  echo 'βœ“ All 47 tests passed in 2.3s'
diff --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.snap
index 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...
βœ… Created new worktree for feature-hooks from main: [TMPDIR]/test-repo.feature-hooks
-πŸ”„ Running post-start: server:
+πŸ”„ Running post-start server:
  echo 'Starting dev server on port 3000'
-πŸ”„ Running post-start: watch:
+πŸ”„ Running post-start watch:
  echo 'Watching for file changes'
diff --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.snap
index 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...
βœ… Created new worktree for feature-hooks from main at [TMPDIR]/test-repo.feature-hooks
-πŸ”„ Running post-start: server:
+πŸ”„ Running post-start server:
  echo 'Starting dev server on port 3000'
-πŸ”„ Running post-start: watch:
+πŸ”„ Running post-start watch:
  echo 'Watching for file changes'
diff --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.snap
index 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
βœ… Merged to main (1 commit, 1 file, +1)
πŸ”„ Removing worktree & branch...
βœ… Removed worktree & branch for feature, returned to primary at [REPO]
-πŸ”„ Running post-merge: notify:
+πŸ”„ Running post-merge notify:
  echo 'Merge to main complete' > notify.txt
-πŸ”„ Running post-merge: deploy:
+πŸ”„ Running post-merge deploy:
  echo 'Deploying branch feature' > deploy.txt
----- 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.snap
index 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: true
exit_code: 0
----- stdout -----
-πŸ”„ Running pre-merge: format:
+πŸ”„ Running pre-merge format:
  exit 0
-πŸ”„ Running pre-merge: lint:
+πŸ”„ Running pre-merge lint:
  exit 0
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  exit 0
πŸ”„ Merging 1 commit to main @ [SHA] (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.snap
index 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
  - Add JWT encoding/decoding with signature verification
  - Create test suite covering all authentication flows
βœ… Squashed @ [SHA]
-πŸ”„ Running pre-merge: test:
+πŸ”„ Running pre-merge test:
  cargo test
-πŸ”„ Running pre-merge: lint:
+πŸ”„ Running pre-merge lint:
  cargo clippy
πŸ”„ Merging 1 commit to main @ [SHA] (no rebase needed)
@@ -48,7 +48,7 @@ exit_code: 0
βœ… Merged to main (1 commit, 3 files, +3)
πŸ”„ Removing worktree & branch...
βœ… Removed worktree & branch for feature-auth, returned to primary at [REPO]
-πŸ”„ Running post-merge: install:
+πŸ”„ Running post-merge install:
  cargo install --path .
----- 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.snap
index 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
  echo 'Setup done' > setup.txt
βœ… Created new worktree for feature from main at [REPO].feature
πŸ’‘ To enable automatic cd, run: wt config shell
-πŸ”„ Running post-start: server:
+πŸ”„ Running post-start server:
  sleep 0.5 && echo 'Server running' > server.txt
----- 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.snap
index 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: true
exit_code: 0
----- stdout -----
-πŸ”„ Running post-create: install:
+πŸ”„ Running post-create install:
  echo 'Installing deps'
-πŸ”„ Running post-create: setup:
+πŸ”„ Running post-create setup:
  echo 'Running setup'
βœ… Created new worktree for feature from main at [REPO].feature
πŸ’‘ To enable automatic cd, run: wt config shell
diff --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.snap
index 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 -----
βœ… Created new worktree for feature from main at [REPO].feature
πŸ’‘ To enable automatic cd, run: wt config shell
-πŸ”„ Running post-start: task1:
+πŸ”„ Running post-start task1:
  echo 'Task 1 running' > task1.txt
-πŸ”„ Running post-start: task2:
+πŸ”„ Running post-start task2:
  echo 'Task 2 running' > task2.txt
----- 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.snap
index 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 -----
βœ… Created new worktree for feature from main at [REPO].feature
πŸ’‘ To enable automatic cd, run: wt config shell
-πŸ”„ Running post-start: task1:
+πŸ”„ Running post-start task1:
  echo 'TASK1_OUTPUT'
-πŸ”„ Running post-start: task2:
+πŸ”„ Running post-start task2:
  echo 'TASK2_OUTPUT'
-πŸ”„ Running post-start: task3:
+πŸ”„ Running post-start task3:
  echo 'TASK3_OUTPUT'
----- stderr -----