about summary refs log tree commit diff
path: root/nix-repl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix-repl.cc')
-rw-r--r--nix-repl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/nix-repl.cc b/nix-repl.cc
index 25f84a3082ab..5c319f068655 100644
--- a/nix-repl.cc
+++ b/nix-repl.cc
@@ -250,7 +250,8 @@ static int runProgram(const string & program, const Strings & args)
 
 bool isVarName(const string & s)
 {
-    // FIXME: not quite correct.
+    if (s.size() > 0 && (s[0] == '-' || s[0] == '\''))
+        return false;
     for (auto & i : s)
         if (!((i >= 'a' && i <= 'z') ||
               (i >= 'A' && i <= 'Z') ||