From b8283773bd64d7da6859ed520ee19867742a03ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 7 Jun 2017 16:17:17 +0200 Subject: nix: Make all options available as flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thus, instead of ‘--option ’, you can write ‘-- ’. So --option http-connections 100 becomes --http-connections 100 Apart from brevity, the difference is that it's not an error to set a non-existent option via --option, but unrecognized arguments are fatal. Boolean options have special treatment: they're mapped to the argument-less flags ‘--’ and ‘--no-’. E.g. --option auto-optimise-store false becomes --no-auto-optimise-store --- src/nix/main.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nix') diff --git a/src/nix/main.cc b/src/nix/main.cc index 216f0bccef11..f83843415e3b 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -22,6 +22,8 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs }); mkFlag(0, "version", "show version information", std::bind(printVersion, programName)); + + settings.convertToArgs(*this); } }; -- cgit 1.4.1