mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-07 05:59:03 +01:00
removed colors in some places for windows, since it didn't work properly there
This commit is contained in:
parent
a8ec5e9c99
commit
75dbba7382
@ -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) {
|
||||
|
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user