1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-06 09:30:35 +02:00

Make sure to enable ANSI for Win10

This commit is contained in:
Jonathan Turner
2019-05-16 18:07:11 -07:00
parent 90f4ba15cf
commit 3c2ac7df54

@ -48,6 +48,7 @@ fn main() -> Result<(), Box<Error>> {
let config = Config::builder().color_mode(ColorMode::Forced).build(); let config = Config::builder().color_mode(ColorMode::Forced).build();
let h = crate::shell::Helper::new(); let h = crate::shell::Helper::new();
let mut rl: Editor<crate::shell::Helper> = Editor::with_config(config); let mut rl: Editor<crate::shell::Helper> = Editor::with_config(config);
let _ = ansi_term::enable_ansi_support();
rl.set_helper(Some(h)); rl.set_helper(Some(h));
if rl.load_history("history.txt").is_err() { if rl.load_history("history.txt").is_err() {
println!("No previous history."); println!("No previous history.");