mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
enable ansi terminal on windows 10 cmd
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2332,6 +2332,7 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
|||||||
name = "uw8"
|
name = "uw8"
|
||||||
version = "0.1.2"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ansi_term",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"curlywas",
|
"curlywas",
|
||||||
"minifb",
|
"minifb",
|
||||||
|
|||||||
@@ -24,3 +24,4 @@ warp = { version = "0.3.2", optional = true }
|
|||||||
tokio = { version = "1.17.0", features = ["sync", "rt"], optional = true }
|
tokio = { version = "1.17.0", features = ["sync", "rt"], optional = true }
|
||||||
tokio-stream = { version = "0.1.8", features = ["sync"], optional = true }
|
tokio-stream = { version = "0.1.8", features = ["sync"], optional = true }
|
||||||
webbrowser = { version = "0.6.0", optional = true }
|
webbrowser = { version = "0.6.0", optional = true }
|
||||||
|
ansi_term = "0.12.1"
|
||||||
@@ -15,6 +15,9 @@ use uw8::Runtime;
|
|||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let mut args = Arguments::from_env();
|
let mut args = Arguments::from_env();
|
||||||
|
|
||||||
|
// try to enable ansi support in win10 cmd shell
|
||||||
|
let _ = ansi_term::enable_ansi_support();
|
||||||
|
|
||||||
match args.subcommand()?.as_deref() {
|
match args.subcommand()?.as_deref() {
|
||||||
Some("version") => {
|
Some("version") => {
|
||||||
println!("{}", env!("CARGO_PKG_VERSION"));
|
println!("{}", env!("CARGO_PKG_VERSION"));
|
||||||
|
|||||||
Reference in New Issue
Block a user