about summary refs log tree commit diff
path: root/src/nix-env/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-env/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-env/main.cc')
-rw-r--r--src/nix-env/main.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 3c72a79507..829e2f4ae5 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -3,6 +3,7 @@
 #include "shared.hh"
 #include "parser.hh"
 #include "eval.hh"
+#include "help.txt.hh"
 
 
 typedef void (* Operation) (EvalState & state,
@@ -20,6 +21,12 @@ struct DrvInfo
 typedef map<Path, DrvInfo> DrvInfos;
 
 
+void printHelp()
+{
+    cout << string((char *) helpText, sizeof helpText);
+}
+
+
 bool parseDerivation(EvalState & state, Expr e, DrvInfo & drv)
 {
     ATMatcher m;
@@ -395,10 +402,6 @@ void run(Strings args)
             op = opUninstall;
         else if (arg == "--query" || arg == "-q")
             op = opQuery;
-        else if (arg == "--verbose" || arg == "-v")
-            verbosity = (Verbosity) ((int) verbosity + 1);
-        else if (arg[0] == '-')
-            opFlags.push_back(arg);
         else
             opArgs.push_back(arg);