mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: check if the commands are similar when checking difference
This commit is contained in:
parent
22b6ad4694
commit
73ad099b34
3 changed files with 16 additions and 8 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use colored::Colorize;
|
||||
use crate::style::highlight_difference;
|
||||
|
||||
mod args;
|
||||
mod files;
|
||||
|
|
@ -16,8 +17,9 @@ fn main() {
|
|||
let corrected_command = suggestions::suggest_command(&shell, &last_command);
|
||||
|
||||
if let Some(corrected_command) = corrected_command {
|
||||
if corrected_command != last_command {
|
||||
suggestions::confirm_suggestion(&shell, &corrected_command, &last_command);
|
||||
let command_difference = highlight_difference(&shell, &corrected_command, &last_command);
|
||||
if let Some(command) = command_difference {
|
||||
suggestions::confirm_suggestion(&shell, &command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue