From 3bebd18de79946bb3ebc1127817f7824f851df9d Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Fri, 20 Dec 2013 12:09:07 +0000 Subject: [PATCH] Show help banner if no command given --- plum/cli/docopt_command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plum/cli/docopt_command.py b/plum/cli/docopt_command.py index 93cf889eb0..d2aeb035fc 100644 --- a/plum/cli/docopt_command.py +++ b/plum/cli/docopt_command.py @@ -28,6 +28,9 @@ class DocoptCommand(object): options = docopt_full_help(getdoc(self), argv, **self.docopt_options()) command = options['COMMAND'] + if command is None: + raise SystemExit(getdoc(self)) + if not hasattr(self, command): raise NoSuchCommand(command, self)