Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Latest commit

 

History

History
37 lines (30 loc) · 1.11 KB

README.md

File metadata and controls

37 lines (30 loc) · 1.11 KB

concolor-example

Example CLI and debug tool

See how to integrate concolor and concolor-clap into an application.

You can then also use this to see how it behaves under various conditions.

$ concolor-example
[crates/example/src/main.rs:13] &args = Args {
    color: Color {
        color: Auto,
    },
}
[crates/example/src/main.rs:15] concolor::get(concolor::Stream::Stdout) = Color {
    flags: CLICOLOR | TERM_SUPPORT | ANSI_SUPPORT | TTY_STDOUT | TTY_STDERR | TTY_ANY,
    choice: Auto,
    stream: Stdout,
}
[crates/example/src/main.rs:16] concolor::get(concolor::Stream::Stderr) = Color {
    flags: CLICOLOR | TERM_SUPPORT | ANSI_SUPPORT | TTY_STDOUT | TTY_STDERR | TTY_ANY,
    choice: Auto,
    stream: Stderr,
}
[crates/example/src/main.rs:17] concolor::get(concolor::Stream::Either) = Color {
    flags: CLICOLOR | TERM_SUPPORT | ANSI_SUPPORT | TTY_STDOUT | TTY_STDERR | TTY_ANY,
    choice: Auto,
    stream: Either,
}

License

Dual-licensed under MIT or Apache 2.0