Skip to content

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

Remove gutter output for config previews

Maximilian Roos0aa911aade58
diff --git a/src/cli.rs b/src/cli.rs
index d0d621158..a179ddd0f 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -181,10 +181,8 @@ Install for specific shell only:
wt config shell install zsh
```
-Skip confirmation prompt:
-```console
-wt config shell install --force
-```"#)]
+Shows proposed changes and waits for confirmation before modifying any files.
+Use --force to skip confirmation."#)]
Install {
/// Shell to install (default: all)
#[arg(value_enum)]
diff --git a/src/main.rs b/src/main.rs
index b1897db87..e2ffb953b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -213,7 +213,6 @@ fn main() {
handle_configure_shell(shell, force)
.map_err(|e| anyhow::anyhow!("{}", e))
.and_then(|scan_result| {
- use worktrunk::styling::format_bash_with_gutter;
// Count shells that became (more) configured
// A shell counts if any of its components changed (extension or completions)
@@ -251,6 +250,8 @@ fn main() {
);
// Use appropriate output function based on action
+ // Note: WouldAdd/WouldCreate are only returned in preview mode,
+ // which is handled internally by prompt_for_confirmation()
match result.action {
ConfigAction::Added | ConfigAction::Created => {
crate::output::success(message)?;
@@ -259,21 +260,10 @@ fn main() {
crate::output::info(message)?;
}
ConfigAction::WouldAdd | ConfigAction::WouldCreate => {
- crate::output::progress(message)?;
+ unreachable!("Preview actions handled by confirmation prompt")
}
}
- // Show config line in preview (so user sees what will be added)
- if matches!(
- result.action,
- ConfigAction::WouldAdd | ConfigAction::WouldCreate
- ) {
- crate::output::gutter(format_bash_with_gutter(
- &result.config_line,
- "",
- ))?;
- }
-
// Show completion result for this shell
// TODO: Inconsistent that shell extensions show gutter but completions don't.
// Completions are dynamic stubs (~30 lines) that call back to `wt` - not
@@ -292,7 +282,7 @@ fn main() {
crate::output::info(comp_message)?;
}
ConfigAction::WouldAdd | ConfigAction::WouldCreate => {
- crate::output::progress(comp_message)?;
+ unreachable!("Preview actions handled by confirmation prompt")
}
}
}