From a558ffcd4279083e20cf894ba8d23de2d1e52270 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 3 Apr 2021 01:40:19 -0400 Subject: [PATCH] CmdContext: List info about both read and write context --- src/commands/CmdContext.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index 142aa88d8..c7c8b76fd 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -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 ()