mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 15:45:11 +01:00
fix: missing color in display
This commit is contained in:
parent
9a56ff41ab
commit
9978c3bcab
3 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ pattern = [
|
||||||
"is not a git command"
|
"is not a git command"
|
||||||
]
|
]
|
||||||
suggest = [
|
suggest = [
|
||||||
"""
|
'''
|
||||||
{{command[0]}} {{typo[1](
|
{{command[0]}} {{typo[1](
|
||||||
add,
|
add,
|
||||||
am,
|
am,
|
||||||
|
|
@ -63,5 +63,5 @@ remote,
|
||||||
repack,
|
repack,
|
||||||
replace,
|
replace,
|
||||||
)}} {{command[2:]}}
|
)}} {{command[2:]}}
|
||||||
"""
|
'''
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ pub fn highlight_difference(suggested_command: &str, last_command: &str) -> Stri
|
||||||
let mut highlighted = suggested_command.to_string();
|
let mut highlighted = suggested_command.to_string();
|
||||||
for entry in &split_suggested_command {
|
for entry in &split_suggested_command {
|
||||||
if old_entries.contains(entry) {
|
if old_entries.contains(entry) {
|
||||||
highlighted = highlighted.replace(entry, &entry.cyan());
|
highlighted = highlighted.replace(entry, &entry.cyan().to_string());
|
||||||
} else {
|
} else {
|
||||||
highlighted = highlighted.replace(entry, &entry.red().bold());
|
highlighted = highlighted.replace(entry, &entry.red().bold().to_string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue