Command-line application framework.
A simple command-line application could look something like this:
```rs use rawcmd::{Command, Flag, Intent};
fn main() { match Command::withname("foo") .withdescription("Command 1") .withflag( Flag::withname("flag1") .withalias("f1") .withdescription("Flag 1") ) .withsubcommand( Command::withname("bar") .withdescription("Command 1:1") .withflag( Flag::withname("flag2") .withalias("f2") .withdescription("Flag 2") ) .withresolver(|| Ok(2)) ) .withresolver(|_| Ok(3)) .run() { Ok(code) => println!("Success: {:?}", code), Err(code) => println!("Error: {:?}", code), } } ```
The function with_resolver
accepts closures and function pointers:
```rs // closure command.withresolver(|| Ok(1))
// function pointer
fn resolver(: Intent) -> Result
cli command <input0> <input1>
).