From 257474be22b9a1b9dbf39abdca98e5cd14165f9f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 19 May 2016 16:20:06 +0200 Subject: [PATCH] imag-tag: Replace UI spec with helpers from libimagentrytag --- imag-tag/src/ui.rs | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/imag-tag/src/ui.rs b/imag-tag/src/ui.rs index 74916879..32e3383c 100644 --- a/imag-tag/src/ui.rs +++ b/imag-tag/src/ui.rs @@ -1,5 +1,7 @@ use clap::{Arg, App, ArgGroup, SubCommand}; +use libimagentrytag::ui::{tag_add_arg, tag_remove_arg}; + pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { app.arg(Arg::with_name("id") .long("id") @@ -8,21 +10,8 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .required(true) .help("Use this entry")) - .arg(Arg::with_name("add") - .long("add") - .short("a") - .takes_value(true) - .required(false) - .multiple(true) - .help("Add this tag")) - - .arg(Arg::with_name("remove") - .long("remove") - .short("r") - .takes_value(true) - .required(false) - .multiple(true) - .help("Remove this tag")) + .arg(tag_add_arg()) + .arg(tag_remove_arg()) .subcommand(SubCommand::with_name("list") .about("List tags (default)")