mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
CLI2: Added ::getToken method for obtaining the canonical form, if possible
This commit is contained in:
parent
9db73962da
commit
7432c0aead
2 changed files with 11 additions and 0 deletions
10
src/CLI2.cpp
10
src/CLI2.cpp
|
@ -137,6 +137,16 @@ const std::string A2::attribute (const std::string& name) const
|
|||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string A2::getToken () const
|
||||
{
|
||||
auto i = _attributes.find ("canonical");
|
||||
if (i == _attributes.end ())
|
||||
i = _attributes.find ("raw");
|
||||
|
||||
return i->second;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string A2::dump () const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue