removed colors in some places for windows, since it didn't work properly there

This commit is contained in:
PaddiM8 2020-12-10 21:13:04 +01:00
parent a8ec5e9c99
commit 75dbba7382
2 changed files with 12 additions and 2 deletions

View File

@ -45,7 +45,12 @@ pub fn eval(parser: &mut parser::Context, input: &str) {
}
pub fn print_err(msg: &str) {
println!("{}", Red.paint(msg));
let msg = if cfg!(windows) {
msg.to_string()
} else {
Red.paint(msg).to_string()
};
println!("{}", msg);
}
fn print_calc_err(err: CalcError) {

View File

@ -24,7 +24,12 @@ pub fn start(mut parser: &mut parser::Context) {
}));
loop {
let readline = editor.readline(&Cyan.paint(">> ").to_string());
let prompt = if cfg!(windows) {
String::from(">> ")
} else {
Cyan.paint(">> ").to_string()
};
let readline = editor.readline(&prompt);
match readline {
Ok(input) => {