about summary refs log tree commit diff
path: root/nix-repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-09T15·22+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-09T15·22+0200
commitdc670a173ab22d344c5d77d502798f0296f572cc (patch)
tree8e3a85211f3cee1ad12e055bc11220b766d75266 /nix-repl.cc
parente91160021f992169228bc59cfa509cfb66335e8c (diff)
Make tab-completion work on builtins
Diffstat (limited to 'nix-repl.cc')
-rw-r--r--nix-repl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/nix-repl.cc b/nix-repl.cc
index 012fdfe1e6c3..98d27b435ef2 100644
--- a/nix-repl.cc
+++ b/nix-repl.cc
@@ -384,8 +384,11 @@ void NixRepl::initEnv()
     env = &state.allocEnv(envSize);
     env->up = &state.baseEnv;
     displ = 0;
-    varNames.clear();
     staticEnv.vars.clear();
+
+    varNames.clear();
+    foreach (StaticEnv::Vars::iterator, i, state.staticBaseEnv.vars)
+        varNames.insert(i->first);
 }