Expression

- Added configurable 'abbreviation.minimum' (default:2) setting to
  control how auto-completion works.
This commit is contained in:
Paul Beckingham
2011-07-20 10:48:59 -04:00
parent a6fadaee67
commit 197524a5fc
16 changed files with 139 additions and 52 deletions

View File

@@ -123,11 +123,11 @@ int CmdCalendar::execute (std::string& output)
for (arg = args.begin (); arg != args.end (); ++arg)
{
// Some version of "calendar".
if (autoComplete (lowerCase (*arg), commandNames, matches) == 1)
if (autoComplete (lowerCase (*arg), commandNames, matches, context.config.getInteger ("abbreviation.minimum")) == 1)
continue;
// "due".
else if (autoComplete (lowerCase (*arg), keywordNames, matches) == 1)
else if (autoComplete (lowerCase (*arg), keywordNames, matches, context.config.getInteger ("abbreviation.minimum")) == 1)
getpendingdate = true;
// "y".
@@ -147,7 +147,7 @@ int CmdCalendar::execute (std::string& output)
}
// "January" etc.
else if (autoComplete (lowerCase (*arg), monthNames, matches) == 1)
else if (autoComplete (lowerCase (*arg), monthNames, matches, context.config.getInteger ("abbreviation.minimum")) == 1)
{
argMonth = Date::monthOfYear (matches[0]);
if (argMonth == -1)