diff options
author | Ben Burdette <bburdette@gmail.com> | 2022-01-05 12:28:31 -0700 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2022-01-05 12:28:31 -0700 |
commit | bf8a065be0d0cdccf5b6bc1034dc3e1709b21bd5 (patch) | |
tree | 7a5df45db88c5876df8768016f8333aa2d27c29c /src/libexpr/eval.cc | |
parent | a4d8a799b7dd6b5368b7892747d18911f8ff9ba2 (diff) |
add colors; remove headings
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index d9c26106e..585042b9d 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -679,12 +679,15 @@ std::optional<EvalState::Doc> EvalState::getDoc(Value & v) void printStaticEnvBindings(const StaticEnv &se, int lvl) { std::cout << "Env level " << lvl << std::endl; - + if (se.up) { + std::cout << ANSI_MAGENTA; for (auto i = se.vars.begin(); i != se.vars.end(); ++i) { std::cout << i->first << " "; } + std::cout << ANSI_NORMAL; + std::cout << std::endl; std::cout << std::endl; @@ -692,12 +695,14 @@ void printStaticEnvBindings(const StaticEnv &se, int lvl) } else { + std::cout << ANSI_MAGENTA; // for the top level, don't print the double underscore ones; they are in builtins. for (auto i = se.vars.begin(); i != se.vars.end(); ++i) { if (((string)i->first).substr(0,2) != "__") std::cout << i->first << " "; } + std::cout << ANSI_NORMAL; std::cout << std::endl; std::cout << std::endl; |