summaryrefslogtreecommitdiff
path: root/cliapp/app.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-01-19 20:20:29 +0000
committerLars Wirzenius <liw@liw.fi>2013-01-19 20:20:29 +0000
commit1c39096b777c4d704dbf96437e35a008cd50ab4c (patch)
tree7009fcc91639f259228cbea1ae2f350e306c6295 /cliapp/app.py
parentb9744094f060bcea9cb5d42df1c7a9cec2c08364 (diff)
downloadcliapp-1c39096b777c4d704dbf96437e35a008cd50ab4c.tar.gz
Format output of the help subcommand
Diffstat (limited to 'cliapp/app.py')
-rw-r--r--cliapp/app.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cliapp/app.py b/cliapp/app.py
index 832e8ad..b0106ee 100644
--- a/cliapp/app.py
+++ b/cliapp/app.py
@@ -260,8 +260,11 @@ class Application(object):
def help(self, args): # pragma: no cover
'''Print help.'''
-
- text = '%s\n%s\n' % (self._format_usage(), self._format_description())
+
+ fmt = cliapp.TextFormat(width=78)
+ usage = self._format_usage()
+ description = fmt.format(self._format_description())
+ text = '%s\n\n%s' % (usage, description)
text = self.settings.progname.join(text.split('%prog'))
self.output.write(text)