mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 10:07: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 table;
|
||||||
table.width (Context::getContext ().getWidth ());
|
table.width (Context::getContext ().getWidth ());
|
||||||
table.add ("Name");
|
table.add ("Name");
|
||||||
|
table.add ("Type");
|
||||||
table.add ("Definition");
|
table.add ("Definition");
|
||||||
table.add ("Active");
|
table.add ("Active");
|
||||||
setHeaderUnderline (table);
|
setHeaderUnderline (table);
|
||||||
|
@ -258,8 +259,15 @@ void CmdContext::listContexts (std::stringstream& out)
|
||||||
|
|
||||||
int row = table.addRow ();
|
int row = table.addRow ();
|
||||||
table.set (row, 0, userContext);
|
table.set (row, 0, userContext);
|
||||||
table.set (row, 1, Context::getContext ().config.get ("context." + userContext));
|
table.set (row, 1, "read");
|
||||||
table.set (row, 2, active);
|
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 ()
|
out << optionalBlankLine ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue