mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Lexer: Captures minimumMatchLength for abbreviated attribute matching
This commit is contained in:
parent
8406dd4c6f
commit
f5792a03fb
3 changed files with 5 additions and 1 deletions
|
@ -617,6 +617,7 @@ void Context::getLimits (int& rows, int& lines)
|
||||||
void Context::staticInitialization ()
|
void Context::staticInitialization ()
|
||||||
{
|
{
|
||||||
CLI2::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
CLI2::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
||||||
|
Lexer::minimumMatchLength = config.getInteger ("abbreviation.minimum");
|
||||||
|
|
||||||
Task::defaultProject = config.get ("default.project");
|
Task::defaultProject = config.get ("default.project");
|
||||||
Task::defaultDue = config.get ("default.due");
|
Task::defaultDue = config.get ("default.due");
|
||||||
|
|
|
@ -34,10 +34,12 @@
|
||||||
|
|
||||||
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
||||||
static const unsigned int uuid_min_length = 8;
|
static const unsigned int uuid_min_length = 8;
|
||||||
std::map <std::string, std::string> Lexer::attributes;
|
|
||||||
|
|
||||||
std::string Lexer::dateFormat = "";
|
std::string Lexer::dateFormat = "";
|
||||||
bool Lexer::isoEnabled = true;
|
bool Lexer::isoEnabled = true;
|
||||||
|
int Lexer::minimumMatchLength = 3;
|
||||||
|
std::map <std::string, std::string> Lexer::attributes;
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Lexer::Lexer (const std::string& text)
|
Lexer::Lexer (const std::string& text)
|
||||||
|
|
|
@ -41,6 +41,7 @@ public:
|
||||||
// These are overridable.
|
// These are overridable.
|
||||||
static std::string dateFormat;
|
static std::string dateFormat;
|
||||||
static bool isoEnabled;
|
static bool isoEnabled;
|
||||||
|
static int minimumMatchLength;
|
||||||
static std::map <std::string, std::string> attributes;
|
static std::map <std::string, std::string> attributes;
|
||||||
|
|
||||||
enum class Type { uuid, number, hex,
|
enum class Type { uuid, number, hex,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue