imag-tag: Replace UI spec with helpers from libimagentrytag

This commit is contained in:
Matthias Beyer 2016-05-19 16:20:06 +02:00
parent ed724d3726
commit 257474be22

View file

@ -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)")