mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
filter out underscore names
This commit is contained in:
parent
c669108981
commit
1b6b33d43d
1 changed files with 19 additions and 7 deletions
|
@ -680,16 +680,28 @@ void printStaticEnvBindings(const StaticEnv &se, int lvl)
|
||||||
{
|
{
|
||||||
std::cout << "Env level " << lvl << std::endl;
|
std::cout << "Env level " << lvl << std::endl;
|
||||||
|
|
||||||
for (auto i = se.vars.begin(); i != se.vars.end(); ++i)
|
|
||||||
{
|
|
||||||
std::cout << i->first << " ";
|
|
||||||
}
|
|
||||||
std::cout << std::endl;
|
|
||||||
std::cout << std::endl;
|
|
||||||
|
|
||||||
if (se.up) {
|
if (se.up) {
|
||||||
|
for (auto i = se.vars.begin(); i != se.vars.end(); ++i)
|
||||||
|
{
|
||||||
|
std::cout << i->first << " ";
|
||||||
|
}
|
||||||
|
std::cout << std::endl;
|
||||||
|
std::cout << std::endl;
|
||||||
|
|
||||||
printStaticEnvBindings(*se.up, ++lvl);
|
printStaticEnvBindings(*se.up, ++lvl);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 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 << std::endl;
|
||||||
|
std::cout << std::endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue