mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-16 08:13:52 +01:00
feat: multi-suggest
This commit is contained in:
parent
e6ed9d617b
commit
1ddfbef7e7
8 changed files with 111 additions and 81 deletions
|
|
@ -8,6 +8,7 @@ pub fn highlight_difference(
|
|||
shell: &str,
|
||||
suggested_command: &str,
|
||||
last_command: &str,
|
||||
difference_only: bool,
|
||||
) -> Option<String> {
|
||||
// let replaced_newline = suggested_command.replace('\n', r" {{newline}} ");
|
||||
let mut split_suggested_command = split_command(suggested_command);
|
||||
|
|
@ -42,7 +43,9 @@ pub fn highlight_difference(
|
|||
}
|
||||
for old in &old_entries {
|
||||
if old == entry {
|
||||
*entry = entry.blue().to_string();
|
||||
if !difference_only {
|
||||
*entry = entry.blue().to_string();
|
||||
}
|
||||
continue 'next;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue