mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Expression
- Added configurable 'abbreviation.minimum' (default:2) setting to control how auto-completion works.
This commit is contained in:
parent
a6fadaee67
commit
197524a5fc
16 changed files with 139 additions and 52 deletions
15
src/Att.cpp
15
src/Att.cpp
|
@ -301,7 +301,10 @@ bool Att::validNameValue (
|
|||
candidates.push_back (modifiableNames[i]);
|
||||
|
||||
std::vector <std::string> matches;
|
||||
autoComplete (name, candidates, matches);
|
||||
autoComplete (name,
|
||||
candidates,
|
||||
matches,
|
||||
context.config.getInteger ("abbreviation.minimum"));
|
||||
|
||||
if (matches.size () == 0)
|
||||
return false;
|
||||
|
@ -327,7 +330,10 @@ bool Att::validNameValue (
|
|||
candidates.push_back (modifierNames[i]);
|
||||
|
||||
matches.clear ();
|
||||
autoComplete (mod, candidates, matches);
|
||||
autoComplete (mod,
|
||||
candidates,
|
||||
matches,
|
||||
context.config.getInteger ("abbreviation.minimum"));
|
||||
|
||||
if (matches.size () == 0)
|
||||
throw std::string ("Unrecognized modifier '") + mod + "'.";
|
||||
|
@ -454,7 +460,10 @@ bool Att::validNameValue (
|
|||
candidates.push_back ("deleted");
|
||||
candidates.push_back ("recurring");
|
||||
candidates.push_back ("waiting");
|
||||
autoComplete (value, candidates, matches);
|
||||
autoComplete (value,
|
||||
candidates,
|
||||
matches,
|
||||
context.config.getInteger ("abbreviation.minimum"));
|
||||
|
||||
if (matches.size () == 1)
|
||||
value = matches[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue