12 releases (3 stable)

1.0.2 Sep 4, 2022
1.0.1 Jun 22, 2021
1.0.0 Jan 9, 2021
0.4.2-alpha.0 Jan 9, 2021
0.1.3 May 28, 2019

#462 in Command-line interface

Download history 9/week @ 2024-04-03

88 downloads per month
Used in 2 crates

MIT license

6KB

leg

πŸ”ˆ Elegant program output made simple

Demo

Build Status Latest version Stability stable

πŸ€™ Ping me on Twitter if you like this project

Thanks to the awesome colored crate this utility works on Linux, MacOS, and Windows (Powershell). Respecting CLICOLOR/CLICOLOR_FORCE and NO_COLOR behavior.

Use

πŸ“ Please visit the full documentation if you want to learn the details.

use leg::*;

head("leg", Some("πŸ”ˆ"), Some("1.0.0"));

info("Informational message", None, None);
success("Successful operation", None, None);
warn("Warn message", None, None);
error("Error message", None, None);
wait("Waiting for something", None, None);
done("Something finished", None, None);

print!("Not shown");
remove();

info("Informational message with scope", Some("myscope"), None);
info(
    "Informational message without new line",
    None,
    Some(false),
);
println!(" => same line");

Contributing

😎 If you want to help please take a look to this file.

Dependencies

~0–7MB
~33K SLoC