diff --git a/http.md b/http.md index 7c00a36..a990042 100644 --- a/http.md +++ b/http.md @@ -199,7 +199,7 @@ pass parameters like what port to use. N >= 2 – suppress startup except for auth data, if present N >= 3 – suppress all startup messages - --no-colour + -c --no-colour Don't colourise log output. diff --git a/src/main.rs b/src/main.rs index be40808..124533c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,8 +105,10 @@ fn result_main() -> Result<(), Error> { }?; if opts.loglevel < options::LogLevel::NoStartup { - print!("{}Hosting \"{}\" on port {}", - trivial_colours::Reset, + if opts.log_colour { + print!("{}", trivial_colours::Reset); + } + print!("Hosting \"{}\" on port {}", opts.hosted_directory.0, responder.socket.port()); if responder.socket.ip() != IpAddr::from([0, 0, 0, 0]) { diff --git a/src/options.rs b/src/options.rs index 26e9e94..06026ee 100644 --- a/src/options.rs +++ b/src/options.rs @@ -132,7 +132,7 @@ impl Options { .arg(Arg::from_usage("-e --no-encode 'Do not encode filesystem files. Default: false'")) .arg(Arg::from_usage("-x --strip-extensions 'Allow stripping index extentions from served paths. Default: false'")) .arg(Arg::from_usage("-q --quiet... 'Suppress increasing amounts of output'")) - .arg(Arg::from_usage("--no-colour 'Don't colourise the log output'")) + .arg(Arg::from_usage("-c --no-colour 'Don't colourise the log output'")) .arg(Arg::from_usage("-d --webdav 'Handle WebDAV requests. Default: false'")) .arg(Arg::from_usage("--ssl [TLS_IDENTITY] 'Data for HTTPS, identity file. Password in HTTP_SSL_PASS env var, otherwise empty'") .validator(Options::identity_validator))