diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2018-08-09 16:00:53 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2018-08-09 16:00:53 +0000 |
commit | f1b2388684179679a6e5076e9c660fe8f6988121 (patch) | |
tree | be7609c5c4ed89b652021bc7c9a0da1d74b4f665 | |
parent | Update to actix 0.7 and add better output (diff) | |
download | miniserve-f1b2388684179679a6e5076e9c660fe8f6988121.tar.gz miniserve-f1b2388684179679a6e5076e9c660fe8f6988121.zip |
Add title to output
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index ded331f..316de67 100644 --- a/src/main.rs +++ b/src/main.rs @@ -257,8 +257,11 @@ fn main() { let canon_path = miniserve_config.path.canonicalize().unwrap(); let path_string = canon_path.to_string_lossy(); + println!("{name} v{version}", + name=Paint::new("miniserve").bold(), + version=crate_version!()); if !miniserve_config.path_explicitly_chosen { - println!("{info} miniserve has been invoked without an explicit path so it will serve the current directory.", info=Paint::blue("Info:").bold()); + println!("{info} miniserve has been invoked without an explicit path so it will serve the current directory.", info=Color::Blue.paint("Info:").bold()); println!( " Invoke with -h|--help to see options or invoke as `miniserve .` to hide this advice." ); @@ -271,7 +274,7 @@ fn main() { } } println!( - "miniserve is serving path {path} at {address}", + "Serving path {path} at {address}", path = Color::Yellow.paint(path_string).bold(), address = Color::Green .paint(format!( |