Code: Improved comments regarding filters/args.
This commit is contained in:
@@ -671,7 +671,8 @@ void CLI::addArg (const std::string& arg)
|
|||||||
if (isTerminator (raw)) // --
|
if (isTerminator (raw)) // --
|
||||||
_terminated = true;
|
_terminated = true;
|
||||||
|
|
||||||
// This is the case where the argument should not be lexed.
|
// This is the case where the argument should not be lexed, which is when it
|
||||||
|
// is a single entity, and recognized.
|
||||||
if (_terminated ||
|
if (_terminated ||
|
||||||
isRCOverride (raw) || // rc:<file>
|
isRCOverride (raw) || // rc:<file>
|
||||||
isConfigOverride (raw) || // rc.<attr>:<value>
|
isConfigOverride (raw) || // rc.<attr>:<value>
|
||||||
@@ -2365,7 +2366,8 @@ bool CLI::disqualifyFirstLastBinary (
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Disqualify terms when there operators hidden by syntactic sugar.
|
// Disqualify terms when there are operators hidden by syntactic sugar.
|
||||||
|
// TODO This always returns false. Why bother?
|
||||||
bool CLI::disqualifySugarFree (
|
bool CLI::disqualifySugarFree (
|
||||||
const std::vector <std::pair <std::string, Lexer::Type>>& lexemes) const
|
const std::vector <std::pair <std::string, Lexer::Type>>& lexemes) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -334,6 +334,9 @@ int CmdCalendar::execute (std::string& output)
|
|||||||
if (context.commands.find (report) == context.commands.end ())
|
if (context.commands.find (report) == context.commands.end ())
|
||||||
throw std::string (STRING_ERROR_DETAILS);
|
throw std::string (STRING_ERROR_DETAILS);
|
||||||
|
|
||||||
|
// TODO Fix this: cal --> task
|
||||||
|
// calendar --> taskendar
|
||||||
|
|
||||||
// If the executable was "cal" or equivalent, replace it with "task".
|
// If the executable was "cal" or equivalent, replace it with "task".
|
||||||
std::string executable = context.cli._args[0].attribute ("raw");
|
std::string executable = context.cli._args[0].attribute ("raw");
|
||||||
auto cal = executable.find ("cal");
|
auto cal = executable.find ("cal");
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ int CmdContext::defineContext (std::vector <std::string>& words, std::stringstre
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// This result is not used, and is just to check validity.
|
||||||
context.cli.addRawFilter ("( " + value + " )");
|
context.cli.addRawFilter ("( " + value + " )");
|
||||||
filter.subset (pending, filtered);
|
filter.subset (pending, filtered);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ int CmdCustom::execute (std::string& output)
|
|||||||
split (sortOrder, reportSort, ',');
|
split (sortOrder, reportSort, ',');
|
||||||
validateSortColumns (sortOrder);
|
validateSortColumns (sortOrder);
|
||||||
|
|
||||||
// Prepend the argument list with those from the report filter.
|
// Add the report filter to any existing filter from the command line or
|
||||||
|
// context.
|
||||||
context.cli.addRawFilter (reportFilter);
|
context.cli.addRawFilter (reportFilter);
|
||||||
|
|
||||||
// Apply filter.
|
// Apply filter.
|
||||||
|
|||||||
Reference in New Issue
Block a user