about summary refs log tree commit diff
path: root/src/nix-instantiate/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-12-01T15·55+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-12-01T15·55+0000
commit078e20885e0805e04669f9b334a516a6d8d12763 (patch)
treef16741a27866a46806c99ec8d5c8371ae5298046 /src/nix-instantiate/main.cc
parent905d5b91fa6fa64e549f9019f9fab4150f00c13a (diff)
* Help text for all (non-script) programs, so no more:
$ nix-instantiate --help
error: unknown flag `--help`
Try `nix-instantiate --help' for more information.

:-)

Diffstat (limited to 'src/nix-instantiate/main.cc')
-rw-r--r--src/nix-instantiate/main.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index 50a4991a53a8..305c3b551ca5 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -6,6 +6,13 @@
 #include "shared.hh"
 #include "eval.hh"
 #include "parser.hh"
+#include "help.txt.hh"
+
+
+void printHelp()
+{
+    cout << string((char *) helpText, sizeof helpText);
+}
 
 
 #if 0
@@ -87,9 +94,7 @@ void run(Strings args)
         }
         else
 #endif
-        if (arg == "--verbose" || arg == "-v")
-            verbosity = (Verbosity) ((int) verbosity + 1);
-        else if (arg == "-")
+        if (arg == "-")
             readStdin = true;
         else if (arg[0] == '-')
             throw UsageError(format("unknown flag `%1%`") % arg);