nix: Show help when no arguments are given

Fixes #1464.
This commit is contained in:
Eelco Dolstra
2017-07-14 13:44:45 +02:00
parent 38374a9d35
commit 112ff7833d
4 changed files with 14 additions and 10 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ void Command::printHelp(const string & programName, std::ostream & out)
MultiCommand::MultiCommand(const Commands & _commands)
: commands(_commands)
{
expectedArgs.push_back(ExpectedArg{"command", 1, [=](Strings ss) {
expectedArgs.push_back(ExpectedArg{"command", 1, true, [=](Strings ss) {
assert(!command);
auto i = commands.find(ss.front());
if (i == commands.end())