#cli #color #no-std #terminal #ansi

no-std concolor-clap

Clap mixin to control console colors

15 releases

0.1.0 Mar 8, 2023
0.0.13 Nov 24, 2022
0.0.10 Mar 23, 2022
0.0.7 Dec 31, 2021
0.0.6 Oct 6, 2021

#91 in Command-line interface

Download history 1115/week @ 2022-11-29 352/week @ 2022-12-06 286/week @ 2022-12-13 329/week @ 2022-12-20 388/week @ 2022-12-27 403/week @ 2023-01-03 447/week @ 2023-01-10 383/week @ 2023-01-17 496/week @ 2023-01-24 705/week @ 2023-01-31 495/week @ 2023-02-07 528/week @ 2023-02-14 709/week @ 2023-02-21 891/week @ 2023-02-28 1377/week @ 2023-03-07 1534/week @ 2023-03-14

4,628 downloads per month
Used in 10 crates

MIT/Apache

24KB
366 lines

concolor-clap

Convenience helper for working with clap

Documentation License Crates Status

Contribute

License

Dual-licensed under MIT or Apache 2.0


lib.rs:

Mixin a clap argument for colored output selection

Examples

// ...
#[derive(Debug, clap::Parser)]
#[clap(color = concolor_clap::color_choice())]
struct Cli {
    #[command(flatten)]
    color: concolor_clap::Color,
}

Features

  • auto (default): Automatically detect color support

Dependencies

~1.8–7MB
~125K SLoC