mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 21:27:19 +02:00
CmdContext: List info about both read and write context
This commit is contained in:
parent
351c3b025c
commit
a558ffcd42
1 changed files with 10 additions and 2 deletions
|
@ -244,6 +244,7 @@ void CmdContext::listContexts (std::stringstream& out)
|
|||
Table table;
|
||||
table.width (Context::getContext ().getWidth ());
|
||||
table.add ("Name");
|
||||
table.add ("Type");
|
||||
table.add ("Definition");
|
||||
table.add ("Active");
|
||||
setHeaderUnderline (table);
|
||||
|
@ -258,8 +259,15 @@ void CmdContext::listContexts (std::stringstream& out)
|
|||
|
||||
int row = table.addRow ();
|
||||
table.set (row, 0, userContext);
|
||||
table.set (row, 1, Context::getContext ().config.get ("context." + userContext));
|
||||
table.set (row, 2, active);
|
||||
table.set (row, 1, "read");
|
||||
table.set (row, 2, Context::getContext ().getTaskContext("read", userContext));
|
||||
table.set (row, 3, active);
|
||||
|
||||
row = table.addRow ();
|
||||
table.set (row, 0, "");
|
||||
table.set (row, 1, "write");
|
||||
table.set (row, 2, Context::getContext ().getTaskContext("write", userContext));
|
||||
table.set (row, 3, active);
|
||||
}
|
||||
|
||||
out << optionalBlankLine ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue