From 075e6530dbcde9732ef603305c8daca561575a8b Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 27 Aug 2015 05:39:22 +0200 Subject: [PATCH] docs: Add section about leveraging contexts in the viewport definitions --- doc/taskwiki.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/taskwiki.txt b/doc/taskwiki.txt index 2f3c8fd..4790ea8 100644 --- a/doc/taskwiki.txt +++ b/doc/taskwiki.txt @@ -386,6 +386,27 @@ You can inspect a give viewport (see what filter and defaults are being used, as well as other pieces of information) by using the |:TaskWikiInspect| command (or hitting ) over a viewport definition. +------------------------------------------- +5.2.7 Usage of existing context definitions + +If you use the context feature in Taskwarrior, you can easily reference +definition of any context using the @[context_name] syntax in the viewport's +filter. + +For example, if you define the following context in the Taskwarrior, + + $ task context define worktoday project:Work due:today + +you can leverage this definition in the filter: + +~ == Work tasks today | @worktoday == + +Which is equivalent to (context gets expanded): + +~ == Work tasks today | project:Work due:today == + +You can also verify the expansion by inspecting the viewport. + ---------------------------------------------------------------------------- 5.3. Extra data sources *taskwiki-features-warriors*