From de1c4eeae2f3439c1550f9627f45adb4586fa83c Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 8 Nov 2012 08:56:52 -0500 Subject: Add command summary to `ipa COMMAND --help` output This makes the output identical to `ipa help COMMAND`. Part of the effort for https://fedorahosted.org/freeipa/ticket/3060 --- ipalib/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index fc6ac6378..ab2918b53 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -770,7 +770,6 @@ class help(frontend.Local): cmd = self.Command[name] if cmd.NO_CLI: raise HelpError(topic=name) - writer(_('Purpose: %s') % unicode(_(cmd.doc)).strip()) self.Backend.cli.build_parser(cmd).print_help(outfile) elif mod_name in sys.modules: self.print_commands(name, outfile) @@ -1085,7 +1084,8 @@ class cli(backend.Executioner): def build_parser(self, cmd): parser = CLIOptionParser( - usage=' '.join(self.usage_iter(cmd)) + usage=' '.join(self.usage_iter(cmd)), + description=cmd.summary, ) option_groups = {} for option in cmd.options(): -- cgit