From 582228714e28ca39163fef47e471b34045f11da4 Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Thu, 19 Nov 2009 15:53:39 +0100 Subject: Print only one line of docstrings in command listings. Full docstring is shown on `ipa help COMMAND`. --- ipalib/cli.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ipalib/cli.py') 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): -- cgit