diff --git a/NEWS b/NEWS index cc7155adf..bc5fc3e8e 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,7 @@ New configuration options in taskwarrior 2.0.0 - New 'avoidlastcolumn' support for Cygwin users. - New 'patterns' enables/disables command line pattern support. - New 'expressions' enables/disables command line expression support. + - New 'dom' enables/disables DOM support for the command line. - New 'json.array' determines whether 'query' command output is enclosed by '[...]'. - New 'regex' control determines whether substitutions use Regular Expressions diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index e1a2f70a0..e26eabbf1 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -315,6 +315,11 @@ Defaults to on. Enables or disables algebraic expression support on the command line, such as "due& value_stack) if (right._category == "dom") { - right._value = context.dom.get (right._raw, task); + if (context.config.getBoolean ("dom")) + right._value = context.dom.get (right._raw, task); + else + right._value = right._raw; + right._category = "string"; } @@ -116,7 +120,11 @@ void E9::eval (const Task& task, std::vector & value_stack) if (right._category == "dom") { - right._value = context.dom.get (right._raw, task); + if (context.config.getBoolean ("dom")) + right._value = context.dom.get (right._raw, task); + else + right._value = right._raw; + right._category = "string"; } @@ -125,7 +133,11 @@ void E9::eval (const Task& task, std::vector & value_stack) if (left._category == "dom") { - left._value = context.dom.get (left._raw, task); + if (context.config.getBoolean ("dom")) + left._value = context.dom.get (left._raw, task); + else + left._value = left._raw; + left._category = "string"; } diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 31ae4b03e..275ab65d6 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -140,6 +140,7 @@ int CmdShow::execute (std::string& output) " dependency.reminder" " detection" " displayweeknumber" + " dom" " due" " echo.command" " edit.verbose"