spec_cmd

Macro spec_cmd 

Source
macro_rules! spec_cmd {
    ($name:literal) => { ... };
    ($name:literal; $($key:ident = $value:expr),* $(,)?) => { ... };
}
Expand description

Create a SpecCommand with minimal boilerplate.

§Syntax

spec_cmd!("name")
spec_cmd!("name"; help = "description")
spec_cmd!("name"; help = "description", aliases = ["a", "b"])

§Examples

use usage::spec_cmd;

// Simple command
let c = spec_cmd!("install");

// Command with help
let c = spec_cmd!("install"; help = "Install packages");

// Command with aliases
let c = spec_cmd!("install"; help = "Install packages", aliases = ["i", "add"]);