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 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> {
|
pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
app.arg(Arg::with_name("id")
|
app.arg(Arg::with_name("id")
|
||||||
.long("id")
|
.long("id")
|
||||||
|
@ -8,21 +10,8 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("Use this entry"))
|
.help("Use this entry"))
|
||||||
|
|
||||||
.arg(Arg::with_name("add")
|
.arg(tag_add_arg())
|
||||||
.long("add")
|
.arg(tag_remove_arg())
|
||||||
.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"))
|
|
||||||
|
|
||||||
.subcommand(SubCommand::with_name("list")
|
.subcommand(SubCommand::with_name("list")
|
||||||
.about("List tags (default)")
|
.about("List tags (default)")
|
||||||
|
|
Loading…
Reference in a new issue