feat: add executed commands to history

This commit is contained in:
iff 2025-04-10 16:39:31 +02:00
parent 7d41d2ba43
commit 3b9b2c662e
8 changed files with 114 additions and 21 deletions

View file

@ -148,12 +148,10 @@ pub fn confirm_suggestion(data: &Data) -> Result<(), String> {
let process = run_suggestion(data, command);
if process.success() {
let cd = shell_evaluated_commands(shell, command);
if let Some(cd) = cd {
println!("{}", cd);
}
shell_evaluated_commands(shell, command, true);
Ok(())
} else {
shell_evaluated_commands(shell, command, false);
if now.elapsed() > Duration::from_secs(3) {
exit(1);
}