CLI
- Implemented ::isTag.
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user