Skip to content

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

Clarify approvals docs (#120)

Maximilian Roos181fb531a41b
diff --git a/docs/content/config.md b/docs/content/config.md
index 5dcf91d86..787428bf4 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -127,7 +127,7 @@ approved-commands = [
]
```
-Manage approvals with `wt config approvals add` and `wt config approvals clear <repo>`.
+Manage approvals with `wt config approvals add` to review and pre-approve commands, and `wt config approvals clear` to reset (add `--global` to clear all projects).
## Project config
diff --git a/src/cli.rs b/src/cli.rs
index 913089d53..67bf7e5ba 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -876,7 +876,7 @@ approved-commands = [
]
```
-Manage approvals with `wt config approvals add` and `wt config approvals clear <repo>`.
+Manage approvals with `wt config approvals add` to review and pre-approve commands, and `wt config approvals clear` to reset (add `--global` to clear all projects).
## Project config
diff --git a/src/commands/statusline.rs b/src/commands/statusline.rs
index 0a358eb69..9b1db5320 100644
--- a/src/commands/statusline.rs
+++ b/src/commands/statusline.rs
@@ -283,10 +283,13 @@ mod tests {
#[test]
fn test_format_directory_fish_style() {
- // Test paths that don't depend on HOME
- assert_eq!(format_directory_fish_style("/tmp/test"), "/t/test");
- assert_eq!(format_directory_fish_style("/"), "/");
- assert_eq!(format_directory_fish_style("/var/log/app"), "/v/l/app");
+ // Test absolute paths (Unix-style paths only meaningful on Unix)
+ #[cfg(unix)]
+ {
+ assert_eq!(format_directory_fish_style("/tmp/test"), "/t/test");
+ assert_eq!(format_directory_fish_style("/"), "/");
+ assert_eq!(format_directory_fish_style("/var/log/app"), "/v/l/app");
+ }
// Test with actual HOME (if set)
if let Ok(home) = env::var("HOME") {
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index bebfd1f4c..8f81545eb 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -142,7 +142,8 @@ When project hooks run for the first time, Worktrunk prompts for approval. Appro
 "pre-merge.test = npm test",
]
-Manage approvals with wt config approvals add and wt config approvals clear <repo>.
+Manage approvals with wt config approvals add to review and pre-approve commands, and wt config approvals clear to reset (add --global to clear
+all projects).
Project config