imag-tag: Replace UI spec with helpers from libimagentrytag
This commit is contained in:
parent
ed724d3726
commit
257474be22
1 changed files with 4 additions and 15 deletions
|
@ -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)")
|
||||
|
|
Loading…
Reference in a new issue