mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
parent
6ac0e9b90f
commit
de1c4eeae2
@ -770,7 +770,6 @@ class help(frontend.Local):
|
|||||||
cmd = self.Command[name]
|
cmd = self.Command[name]
|
||||||
if cmd.NO_CLI:
|
if cmd.NO_CLI:
|
||||||
raise HelpError(topic=name)
|
raise HelpError(topic=name)
|
||||||
writer(_('Purpose: %s') % unicode(_(cmd.doc)).strip())
|
|
||||||
self.Backend.cli.build_parser(cmd).print_help(outfile)
|
self.Backend.cli.build_parser(cmd).print_help(outfile)
|
||||||
elif mod_name in sys.modules:
|
elif mod_name in sys.modules:
|
||||||
self.print_commands(name, outfile)
|
self.print_commands(name, outfile)
|
||||||
@ -1085,7 +1084,8 @@ class cli(backend.Executioner):
|
|||||||
|
|
||||||
def build_parser(self, cmd):
|
def build_parser(self, cmd):
|
||||||
parser = CLIOptionParser(
|
parser = CLIOptionParser(
|
||||||
usage=' '.join(self.usage_iter(cmd))
|
usage=' '.join(self.usage_iter(cmd)),
|
||||||
|
description=cmd.summary,
|
||||||
)
|
)
|
||||||
option_groups = {}
|
option_groups = {}
|
||||||
for option in cmd.options():
|
for option in cmd.options():
|
||||||
|
Loading…
Reference in New Issue
Block a user