Add different colors for before/after tag listing

This commit is contained in:
Bob Polis 2024-07-19 17:03:07 +02:00
parent 01738449c5
commit 1e7ace00c4

View File

@ -64,13 +64,13 @@ static void process(const char* path) {
if (edits) {
if (should_list) {
std::cout << path << '\n';
std::cout << " before: " << sc::join(tags, ", ") << '\n';
std::cout << " before: " << sc::io::greenf << sc::join(tags, ", ") << sc::io::reset << '\n';
}
handle_deletions(tags);
handle_changes(tags);
handle_additions(tags);
if (should_list) {
std::cout << " after: " << sc::join(tags, ", ") << '\n';
std::cout << " after: " << sc::io::yellowf << sc::join(tags, ", ") << sc::io::reset << '\n';
}
std::string joined {sc::join(tags, ",")};
throw_if_min1(setxattr(path, tagname, joined.c_str(), joined.size(), 0));