mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: don't execute styled command
This commit is contained in:
parent
73ad099b34
commit
77b0793076
2 changed files with 2 additions and 4 deletions
|
|
@ -18,8 +18,8 @@ fn main() {
|
|||
|
||||
if let Some(corrected_command) = corrected_command {
|
||||
let command_difference = highlight_difference(&shell, &corrected_command, &last_command);
|
||||
if let Some(command) = command_difference {
|
||||
suggestions::confirm_suggestion(&shell, &command);
|
||||
if let Some(highlighted_command) = command_difference {
|
||||
suggestions::confirm_suggestion(&shell, &corrected_command, &highlighted_command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ use colored::*;
|
|||
pub fn highlight_difference(shell: &str, suggested_command: &str, last_command: &str) -> Option<String> {
|
||||
let mut split_suggested_command = split_command(suggested_command);
|
||||
let split_last_command = split_command(last_command);
|
||||
println!("split_suggested_command: {:?}", split_suggested_command);
|
||||
println!("split_last_command: {:?}", split_last_command);
|
||||
|
||||
if split_suggested_command == split_last_command {
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue