clap

Macro crate_authors

Source
macro_rules! crate_authors {
    ($sep:expr) => { ... };
    () => { ... };
}
Available on crate feature cargo only.
Expand description

Allows you to pull the authors for the command from your Cargo.toml at compile time in the form: "author1 lastname <author1@example.com>:author2 lastname <author2@example.com>"

You can replace the colons with a custom separator by supplying a replacement string, so, for example, crate_authors!(",\n") would become "author1 lastname <author1@example.com>,\nauthor2 lastname <author2@example.com>,\nauthor3 lastname <author3@example.com>"

ยงExamples

let m = Command::new("cmd")
            .author(crate_authors!("\n"))
            .get_matches();