about summary refs log tree commit diff
path: root/src/nix/repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-25T16·58+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-25T16·58+0200
commit536f06176519072011aebe0d9b4b5b75e1691f67 (patch)
tree4eca1ae9a88b914b96849cce7bbe6c848dd84365 /src/nix/repl.cc
parent5bd8795e1fa9255836fbbeab0a22f5038d92d53c (diff)
"using namespace std" considered harmful
Diffstat (limited to 'src/nix/repl.cc')
-rw-r--r--src/nix/repl.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 78d973ba8320..964bb85eb6f4 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -19,8 +19,6 @@
 
 namespace nix {
 
-using namespace std;
-
 #define ESC_RED "\033[31m"
 #define ESC_GRE "\033[32m"
 #define ESC_YEL "\033[33m"
@@ -70,7 +68,8 @@ struct NixRepl
 
 void printHelp()
 {
-    cout << "Usage: nix-repl [--help] [--version] [-I path] paths...\n"
+    std::cout
+         << "Usage: nix-repl [--help] [--version] [-I path] paths...\n"
          << "\n"
          << "nix-repl is a simple read-eval-print loop (REPL) for the Nix package manager.\n"
          << "\n"
@@ -97,8 +96,7 @@ void printHelp()
          << "        If an element of paths starts with http:// or https://, it is interpreted\n"
          << "        as the URL of a tarball that will be downloaded and unpacked to a temporary\n"
          << "        location. The tarball must include a single top-level directory containing\n"
-         << "        at least a file named default.nix.\n"
-         << flush;
+         << "        at least a file named default.nix.\n";
 }
 
 
@@ -351,7 +349,8 @@ bool NixRepl::processLine(string line)
     }
 
     if (command == ":?" || command == ":help") {
-        cout << "The following commands are available:\n"
+        std::cout
+             << "The following commands are available:\n"
              << "\n"
              << "  <expr>        Evaluate and print expression\n"
              << "  <x> = <expr>  Bind expression to variable\n"