From 551edc2828f012d002daa0f8109026b7ba32d1f2 Mon Sep 17 00:00:00 2001 From: iff Date: Tue, 19 Nov 2024 19:09:24 +0100 Subject: [PATCH] chore: probably smaller error msg --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index dc72984..da17047 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,6 +64,8 @@ fn main() { let mut last_command = shell::last_command(&shell); last_command = shell::expand_alias(&shell, &last_command); let mut error_msg = command_output(&shell, &last_command); + error_msg = error_msg.split_whitespace().collect::>().join(" "); + loop { let suggestion = { let command = suggestions::suggest_command(&shell, &last_command, &error_msg); @@ -91,6 +93,7 @@ fn main() { } else { last_command = suggestion; error_msg = execution.err().unwrap(); + error_msg = error_msg.split_whitespace().collect::>().join(" "); let retry_message = format!("{}...", t!("retry"));