From 030dd838277e7868a1f73b0edf518fa4b0849c2d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 30 Apr 2019 14:39:39 +0200 Subject: Add: Feature to sort output --- src/cli.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index cf06dbe..c04052c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -62,6 +62,23 @@ pub fn build_cli<'a>() -> App<'a, 'a> { .takes_value(true) .help("Query data about a project") ) + + .arg(Arg::with_name("sort-version") + .long("sort-version") + .required(false) + .multiple(false) + .takes_value(false) + .help("Sort output by version") + .conflicts_with("sort-repo") + ) + .arg(Arg::with_name("sort-repo") + .long("sort-repo") + .required(false) + .multiple(false) + .takes_value(false) + .help("Sort output by repository") + .conflicts_with("sort-version") + ) ) .subcommand(SubCommand::with_name("problems") @@ -89,6 +106,23 @@ pub fn build_cli<'a>() -> App<'a, 'a> { .args(&["repo", "maintainer"]) .required(true)) + + .arg(Arg::with_name("sort-maintainer") + .long("sort-maintainer") + .required(false) + .multiple(false) + .takes_value(false) + .help("Sort output by maintainer") + .conflicts_with("sort-repo") + ) + .arg(Arg::with_name("sort-repo") + .long("sort-repo") + .required(false) + .multiple(false) + .takes_value(false) + .help("Sort output by repository") + .conflicts_with("sort-maintainer") + ) ) .subcommand(SubCommand::with_name("compare") -- cgit v1.2.3