pub fn parse_cmd() {
    let matches = App::new("Crossroads CLI")
        .about("A CLI tool for managing Crossroads.")
        .bin_name("xr")
        .version("0.0.1")
        .author("Kai Yao <kai.b.yao@gmail.com>")
        .setting(AppSettings::SubcommandRequiredElseHelp)
        .subcommand(cmd_new())
        .subcommand(cmd_generate())
        .subcommand(cmd_run())
        // .subcommand(cmd_import())
        // .subcommand(cmd_upgrade())
        .get_matches();

    match matches.subcommand() {
        ("new", Some(sub_cmd))       => {
            parse_new(sub_cmd)
        },
        ("generate", Some(_sub_cmd)) => {},
        ("run", Some(_sub_cmd))      => {},
        _                            => {
            println!("Invalid command");
        }
    }
}
/// Generates the command line tool interface
Generates the command line tool interface
Generates the command line tool interface
pub fn parse_cmd() {
    let matches = App::new("Crossroads CLI")
        .about("A CLI tool for managing Crossroads.")
        .bin_name("xr")
        .version("0.0.1")
        .author("Kai Yao <kai.b.yao@gmail.com>")
        .setting(AppSettings::SubcommandRequiredElseHelp)
        .subcommand(cmd_new())
        .subcommand(cmd_generate())
        .subcommand(cmd_run())
        // .subcommand(cmd_import())
        // .subcommand(cmd_upgrade())
        .get_matches();
    match matches.subcommand() {
        ("new", Some(sub_cmd))       => {
            parse_new(sub_cmd)
        },
        ("generate", Some(_sub_cmd)) => {},
        ("run", Some(_sub_cmd))      => {},
        _                            => {
            println!("Invalid command");
        }
    }
}
pub fn parse_cmd ( ) { let matches = App :: new ( " " ) . about ( " " ) . bin_name ( " " ) . version ( " " ) . author ( " " ) . setting ( AppSettings :: SubcommandRequiredElseHelp ) . subcommand ( cmd_new ( ) ) . subcommand ( cmd_generate ( ) ) . subcommand ( cmd_run ( ) ) // .subcommand(cmd_import()) // .subcommand(cmd_upgrade()) . get_matches ( ) ; match matches . subcommand ( ) { ( " " , Some ( sub_cmd ) ) => { parse_new ( sub_cmd ) } , ( " " , Some ( _sub_cmd ) ) => { } , ( " " , Some ( _sub_cmd ) ) => { } , _ => { println ! ( " " ) ; } } }
Generates the command line tool interface
Generates the command line tool interface