diff --git a/imag-tag/src/main.rs b/imag-tag/src/main.rs index f737d6e0..4ab50895 100644 --- a/imag-tag/src/main.rs +++ b/imag-tag/src/main.rs @@ -13,8 +13,10 @@ use std::process::exit; use libimagrt::runtime::Runtime; use libimagentrytag::tagable::Tagable; +use libimagentrytag::tag::Tag; use libimagstore::storeid::build_entry_path; use libimagerror::trace::trace_error; +use libimagentrytag::ui::{get_add_tags, get_remove_tags}; mod ui; @@ -41,9 +43,8 @@ fn main() { .subcommand_name() .map_or_else( || { - let add = rt.cli().values_of("add").map(|o| o.map(String::from)); - let rem = rt.cli().values_of("remove").map(|o| o.map(String::from)); - + let add = get_add_tags(rt.cli()); + let rem = get_remove_tags(rt.cli()); alter(&rt, id, add, rem); }, |name| { @@ -58,7 +59,7 @@ fn main() { }); } -fn alter>(rt: &Runtime, id: &str, add: Option, rem: Option) { +fn alter(rt: &Runtime, id: &str, add: Option>, rem: Option>) { let path = { match build_entry_path(rt.store(), id) { Err(e) => {