diff --git a/src/app.rs b/src/app.rs index a087df9..adebb66 100644 --- a/src/app.rs +++ b/src/app.rs @@ -91,13 +91,50 @@ pub fn app() { .author("Casey Rodarmor ") .about("Just a command runner - https://github.com/casey/just") .setting(AppSettings::ColoredHelp) + .arg(Arg::with_name("arguments") + .multiple(true) + .help("The recipe(s) to run, defaults to the first recipe in the justfile")) + .arg(Arg::with_name("color") + .long("color") + .takes_value(true) + .possible_values(&["auto", "always", "never"]) + .default_value("auto") + .help("Prints colorful output")) + .arg(Arg::with_name("dry-run") + .long("dry-run") + .help("Prints what just would do without doing it") + .conflicts_with("quiet")) + .arg(Arg::with_name("dump") + .long("dump") + .help("Prints entire justfile")) + .arg(Arg::with_name("edit") + .short("e") + .long("edit") + .help("Opens justfile with $EDITOR")) + .arg(Arg::with_name("evaluate") + .long("evaluate") + .help("Prints evaluated variables")) + .arg(Arg::with_name("justfile") + .long("justfile") + .takes_value(true) + .help("Uses as justfile. --working-directory must also be set") + .requires("working-directory")) .arg(Arg::with_name("list") .short("l") .long("list") .help("Lists available recipes and their arguments")) - .arg(Arg::with_name("dump") - .long("dump") - .help("Prints entire justfile")) + .arg(Arg::with_name("quiet") + .short("q") + .long("quiet") + .help("Suppresses all output") + .conflicts_with("dry-run")) + .arg(Arg::with_name("set") + .long("set") + .takes_value(true) + .number_of_values(2) + .value_names(&["variable", "value"]) + .multiple(true) + .help("Sets to ")) .arg(Arg::with_name("show") .short("s") .long("show") @@ -107,52 +144,14 @@ pub fn app() { .arg(Arg::with_name("summary") .long("summary") .help("Lists names of available recipes")) - .arg(Arg::with_name("edit") - .short("e") - .long("edit") - .help("Opens justfile with $EDITOR")) - .arg(Arg::with_name("quiet") - .short("q") - .long("quiet") - .help("Suppresses all output") - .conflicts_with("dry-run")) .arg(Arg::with_name("verbose") - .short("v") - .long("verbose") + .short("v") .long("verbose") .help("Use verbose output")) - .arg(Arg::with_name("dry-run") - .long("dry-run") - .help("Prints what just would do without doing it") - .conflicts_with("quiet")) - .arg(Arg::with_name("evaluate") - .long("evaluate") - .help("Prints evaluated variables")) - .arg(Arg::with_name("color") - .long("color") - .takes_value(true) - .possible_values(&["auto", "always", "never"]) - .default_value("auto") - .help("Prints colorful output")) - .arg(Arg::with_name("set") - .long("set") - .takes_value(true) - .number_of_values(2) - .value_names(&["variable", "value"]) - .multiple(true) - .help("Sets to ")) .arg(Arg::with_name("working-directory") - .long("working-directory") - .takes_value(true) - .help("Uses as working directory. --justfile must also be set") - .requires("justfile")) - .arg(Arg::with_name("justfile") - .long("justfile") - .takes_value(true) - .help("Uses as justfile. --working-directory must also be set") - .requires("working-directory")) - .arg(Arg::with_name("arguments") - .multiple(true) - .help("The recipe(s) to run, defaults to the first recipe in the justfile")) + .long("working-directory") + .takes_value(true) + .help("Uses as working directory. --justfile must also be set") + .requires("justfile")) .group(ArgGroup::with_name("early-exit") .args(&["dump", "edit", "list", "show", "summary", "arguments", "evaluate"])) .get_matches();