mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 03:58:28 +02:00
Remove x1b, update prompt (#3291)
* add term size command * remove \x1b and use nu_ansi_term, make prompt with no config prettier
This commit is contained in:
@ -252,13 +252,17 @@ pub fn wrap<'a>(
|
||||
};
|
||||
|
||||
if let Some(leading_match) = re_leading.find(¤t_line.clone()) {
|
||||
String::insert_str(&mut current_line, leading_match.end(), "\x1b[0m");
|
||||
String::insert_str(
|
||||
&mut current_line,
|
||||
leading_match.end(),
|
||||
nu_ansi_term::ansi::RESET,
|
||||
);
|
||||
String::insert_str(&mut current_line, leading_match.start(), &bg_color_string);
|
||||
}
|
||||
|
||||
if let Some(trailing_match) = re_trailing.find(¤t_line.clone()) {
|
||||
String::insert_str(&mut current_line, trailing_match.start(), &bg_color_string);
|
||||
current_line += "\x1b[0m";
|
||||
current_line += nu_ansi_term::ansi::RESET;
|
||||
}
|
||||
|
||||
output.push(WrappedLine {
|
||||
|
Reference in New Issue
Block a user