mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
#21 Move method to gather tags to CLI
This commit is contained in:
parent
d8169d7952
commit
db13bd403f
3 changed files with 18 additions and 6 deletions
14
src/CLI.cpp
14
src/CLI.cpp
|
@ -539,3 +539,17 @@ std::set<int> CLI::getIds() const
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::vector<std::string> CLI::getTags () const
|
||||
{
|
||||
std::vector <std::string> tags;
|
||||
|
||||
for (auto& arg : _args)
|
||||
{
|
||||
if (arg.hasTag ("TAG"))
|
||||
tags.push_back (arg.attribute ("raw"));
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue