mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
getTaskContext: Allow getting context info for a non-active context
This commit is contained in:
parent
c0ded37f91
commit
351c3b025c
3 changed files with 14 additions and 10 deletions
|
@ -604,9 +604,10 @@ void CLI2::addContext (bool readable, bool writeable)
|
|||
// Detect if any context is set, and bail out if not
|
||||
std::string contextString;
|
||||
if (readable)
|
||||
contextString = Context::getContext ().getTaskContext("read");
|
||||
// Empty string is treated as "currently selected context"
|
||||
contextString = Context::getContext ().getTaskContext("read", "");
|
||||
else if (writeable)
|
||||
contextString = Context::getContext ().getTaskContext("write");
|
||||
contextString = Context::getContext ().getTaskContext("write", "");
|
||||
else
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue