diff --git a/src/main.rs b/src/main.rs index 78d8506..1cff7c2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -96,13 +96,13 @@ impl BuildKind { fn parse_args() -> Args { use clap::{App, Arg, ArgGroup}; + use std::iter::FromIterator; let version = option_env!("CARGO_PKG_VERSION").unwrap_or("unknown"); let about = r#"Compiles and runs a Rust script."#; let app = App::new(consts::PROGRAM_NAME) .version(version) .setting(clap::AppSettings::TrailingVarArg) - .setting(clap::AppSettings::AllowLeadingHyphen) .about(about) .arg(Arg::new("script") .index(1) @@ -117,12 +117,7 @@ fn parse_args() -> Args { } else { &["list-templates"] }) - ) - .arg(Arg::new("script-args") - .index(2) - .about("Arguments for the script to execute.") .multiple_values(true) - .min_values(0) ) .arg(Arg::new("expr") .about("Execute