Notes: Implement command_add_tags()

This commit is contained in:
Matthias Beyer 2016-01-02 19:07:40 +01:00
parent 1bccf067bf
commit e42d7f7f8d

View file

@ -137,7 +137,15 @@ impl<'a> Notes<'a> {
}
fn command_add_tags(&self, matches: &ArgMatches) -> bool {
unimplemented!()
use module::helpers::header::tags::data::alter_tags_in_files;
use self::header::rebuild_header_with_tags;
let parser = Parser::new(JsonHeaderParser::new(None));
alter_tags_in_files(self, matches, &parser, |old_tags, cli_tags| {
let mut new_tags = old_tags.clone();
new_tags.append(&mut cli_tags.clone());
new_tags
}, rebuild_header_with_tags)
}
fn command_rm_tags(&self, matches: &ArgMatches) -> bool {