mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
CLI
- Implemented ::isTag.
This commit is contained in:
parent
fbfd352de3
commit
1d55abd3c0
2 changed files with 13 additions and 0 deletions
12
src/CLI.cpp
12
src/CLI.cpp
|
@ -484,6 +484,7 @@ void CLI::addArg (const std::string& arg)
|
|||
if (isTerminator (arg) ||
|
||||
isRCOverride (arg) ||
|
||||
isConfigOverride (arg) ||
|
||||
isTag (arg) ||
|
||||
isUUIDList (arg) ||
|
||||
isUUID (arg) ||
|
||||
isIDSequence (arg) ||
|
||||
|
@ -1711,6 +1712,17 @@ bool CLI::isConfigOverride (const std::string& raw) const
|
|||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool CLI::isTag (const std::string& raw) const
|
||||
{
|
||||
if (raw.size () >= 2 &&
|
||||
(raw[0] == '+' || raw[0] == '-') &&
|
||||
raw.find (' ') == std::string::npos)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool CLI::isUUIDList (const std::string& raw) const
|
||||
{
|
||||
|
|
|
@ -101,6 +101,7 @@ private:
|
|||
bool isTerminator (const std::string&) const;
|
||||
bool isRCOverride (const std::string&) const;
|
||||
bool isConfigOverride (const std::string&) const;
|
||||
bool isTag (const std::string&) const;
|
||||
bool isUUIDList (const std::string&) const;
|
||||
bool isUUID (const std::string&) const;
|
||||
bool isIDSequence (const std::string&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue