mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-10 23:00:56 +00:00
Give control characters their own colour
This commit is contained in:
parent
eb7e53ef6c
commit
4249cf0fcc
@ -22,6 +22,7 @@ pub struct Colours {
|
||||
pub symlink_path: Style,
|
||||
pub broken_arrow: Style,
|
||||
pub broken_filename: Style,
|
||||
pub control_char: Style,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq)]
|
||||
@ -170,7 +171,8 @@ impl Colours {
|
||||
|
||||
symlink_path: Cyan.normal(),
|
||||
broken_arrow: Red.normal(),
|
||||
broken_filename: Red.underline()
|
||||
broken_filename: Red.underline(),
|
||||
control_char: Red.normal(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ fn coloured_file_name<'a>(file: &File, colours: &Colours) -> Vec<ANSIString<'a>>
|
||||
bits.push(colour.paint(s));
|
||||
} else {
|
||||
let s = c.escape_default().collect::<String>();
|
||||
bits.push(colours.broken_arrow.paint(s));
|
||||
bits.push(colours.control_char.paint(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user