toiletcli
A tiny framework for command line applications.
Each module can be disabled/enabled via default features:
[]
= ["flags", "colors", "escapes"]
This crate contains examples and a demo cat program, which can be built/run with:
$ cargo run --example <cat/flags/colors/escapes>
Usage
pub mod flags;
//! Command line flag parsing.
use args;
use flags;
use *;
let mut color: String;
let mut show_help: bool;
let mut flags = flags!;
let args = parse_flags;
pub mod colors;
//! ANSI terminal colors as enums that all implement `Display` and `FromStr` traits.
use Color;
println!;
let weird_style = new
.foreground
.background
.add_style
.underline_color
.underline_style
.build;
println!;
pub mod escapes;
//! Enums for ANSI terminal cursor manipulation that all implement `Display`.
use *;
println!;
// This is a 'bird' that will be replaced!
println!;
// This is a 'cat' that will be replaced too!
print!;
// Look at the title :3
pub mod common;
//! Common functions.
use common;
let path = "toilet/bin/program";
let name = name_from_path;
assert_eq!;