mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
feat: add executed commands to history
This commit is contained in:
parent
7d41d2ba43
commit
3b9b2c662e
8 changed files with 114 additions and 21 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue