diff options
-rw-r--r-- | src/cli.rs | 67 | ||||
-rw-r--r-- | src/commands/find_pkg.rs | 12 |
2 files changed, 77 insertions, 2 deletions
@@ -390,10 +390,75 @@ pub fn cli<'a>() -> App<'a> { .arg(Arg::new("terse") .required(false) .multiple(false) - .short('t') .long("terse") + .short('t') .about("Do not use the fancy format, but simply <name> <version>") ) + + .arg(Arg::new("show_sources") + .required(false) + .multiple(false) + .long("source") + .alias("sources") + .short('S') + .about("Show the sources of the package") + ) + + .arg(Arg::new("show_dependencies") + .required(false) + .multiple(false) + .long("dependencies") + .alias("deps") + .short('D') + .about("Show the dependencies of the package") + ) + + .arg(Arg::new("show_patches") + .required(false) + .multiple(false) + .long("patches") + .short('p') + .about("Show the patches of the package") + ) + + .arg(Arg::new("show_env") + .required(false) + .multiple(false) + .long("env") + .short('E') + .about("Show the environment of the package") + ) + + .arg(Arg::new("show_flags") + .required(false) + .multiple(false) + .long("flags") + .short('F') + .about("Show the flags of the package") + ) + + .arg(Arg::new("show_deny_images") + .required(false) + .multiple(false) + .long("deny-images") + .about("Show the images on which the package is not allowed to be built") + ) + + .arg(Arg::new("show_phases") + .required(false) + .multiple(false) + .long("phases") + .short('P') + .about("Show the phases of the script of the package") + ) + + .arg(Arg::new("show_script") + .required(false) + .multiple(false) + .long("script") + .short('s') + .about("Show the script of the package") + ) ) .subcommand(App::new("source") .about("Handle package sources") diff --git a/src/commands/find_pkg.rs b/src/commands/find_pkg.rs index 90cf6c1..b53ea6b 100644 --- a/src/commands/find_pkg.rs +++ b/src/commands/find_pkg.rs @@ -43,8 +43,18 @@ pub async fn find_pkg(matches: &ArgMatches, config: &Configuration, repo: Reposi crate::ui::print_packages(&mut outlock, format, iter, + config, true, - true) + true, + matches.is_present("show_sources"), + matches.is_present("show_dependencies"), + matches.is_present("show_patches"), + matches.is_present("show_env"), + matches.is_present("show_flags"), + matches.is_present("show_deny_images"), + matches.is_present("show_phases"), + matches.is_present("show_script") + ) } } |