diff options
author | Pavel Zuna <pzuna@redhat.com> | 2009-11-19 15:53:39 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-11-30 13:25:19 -0500 |
commit | 582228714e28ca39163fef47e471b34045f11da4 (patch) | |
tree | 4470fb05b2a9104261625f41ea1210e1a4a0177a | |
parent | cfec51819bd40f2795f0771a74714e0ce1135c26 (diff) | |
download | freeipa-582228714e28ca39163fef47e471b34045f11da4.tar.gz freeipa-582228714e28ca39163fef47e471b34045f11da4.tar.xz freeipa-582228714e28ca39163fef47e471b34045f11da4.zip |
Print only one line of docstrings in command listings.
Full docstring is shown on `ipa help COMMAND`.
-rw-r--r-- | ipalib/cli.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 58d9b0744..f54e6e754 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -577,7 +577,7 @@ class help(frontend.Command): mcl = max(len(s) for s in (self.Command)) for cname in self.Command: cmd = self.Command[cname] - print '%s %s' % (to_cli(cmd.name).ljust(mcl), cmd.doc) + print '%s %s' % (to_cli(cmd.name).ljust(mcl), cmd.summary) else: raise HelpError(topic=name) @@ -588,8 +588,7 @@ class help(frontend.Command): print '' print 'Built-in commands:' for c in self._builtins: - doc = (c.doc or '').strip().split('\n', 1)[0] - print ' %s %s' % (to_cli(c.name).ljust(self._mtl), c.doc) + print ' %s %s' % (to_cli(c.name).ljust(self._mtl), c.summary) print '' print 'Help topics:' for t in topics: @@ -609,7 +608,7 @@ class help(frontend.Command): print '' print 'Related commands:' for c in commands: - print ' %s %s' % (to_cli(c.name).ljust(mcl), c.doc) + print ' %s %s' % (to_cli(c.name).ljust(mcl), c.summary) class console(frontend.Command): |