Skip to content

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

Style: Apply styling to `configure-shell` and `worktree` prompts

Maximilian Roos7f87a2e72c2f
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rs
index 61739b52e..243fd9e0f 100644
--- a/src/commands/configure_shell.rs
+++ b/src/commands/configure_shell.rs
@@ -334,6 +334,7 @@ fn configure_fish_file(
fn prompt_for_confirmation(results: &[ConfigureResult]) -> Result<bool, String> {
use anstyle::{AnsiColor, Color, Style};
+ use worktrunk::styling::{HINT_EMOJI, eprint};
let cyan = Style::new().fg_color(Some(Color::Ansi(AnsiColor::Cyan)));
let cyan_bold = cyan.bold();
@@ -365,7 +366,8 @@ fn prompt_for_confirmation(results: &[ConfigureResult]) -> Result<bool, String>
}
eprintln!();
- eprint!("💡 Proceed? [y/N] ");
+ let bold = Style::new().bold();
+ eprint!("{HINT_EMOJI} Proceed? {bold}[y/N]{bold:#} ");
io::stderr().flush().map_err(|e| e.to_string())?;
let mut input = String::new();
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 9f9bc555f..f82ab16f8 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -488,6 +488,7 @@ fn expand_command_template(
/// Prompt the user to approve a command for execution
fn prompt_for_approval(command: &str, project_id: &str) -> io::Result<bool> {
use anstyle::Style;
+ use worktrunk::styling::{HINT_EMOJI, eprint};
// Extract project name from project_id (e.g., "worktrunk" from "github.com/max-sixty/worktrunk")
let project_name = project_id.split('/').next_back().unwrap_or(project_id);
@@ -501,7 +502,7 @@ fn prompt_for_approval(command: &str, project_id: &str) -> io::Result<bool> {
eprintln!();
eprintln!(" {dim}{command}{dim:#}");
eprintln!();
- eprint!("Allow and remember? [y/N] ");
+ eprint!("{HINT_EMOJI} Allow and remember? {bold}[y/N]{bold:#} ");
io::stderr().flush()?;
let mut input = String::new();