mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CLI: Added ::getCommand
This commit is contained in:
parent
518389ec58
commit
f44194d54d
2 changed files with 11 additions and 0 deletions
10
src/CLI.cpp
10
src/CLI.cpp
|
@ -260,6 +260,16 @@ bool CLI::canonicalize (
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string CLI::getCommand () const
|
||||
{
|
||||
for (const auto& a : _args)
|
||||
if (a.hasTag ("CMD"))
|
||||
return a.attribute ("canonical");
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string CLI::dump (const std::string& title) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue