--- a/docs/changelog.rst Tue Dec 07 13:17:55 2010 +0100
+++ b/docs/changelog.rst Wed Dec 29 10:06:42 2010 +0100
@@ -1,6 +1,12 @@
Changelog
---------
+1.2 (2010.12.29)
+~~~~~~~~~~~~~~~~
+
+ - fix option display for a list of subcommands if docstring starts with a blank
+ line
+
1.1 (2010.12.07)
~~~~~~~~~~~~~~~~
--- a/opster.py Tue Dec 07 13:17:55 2010 +0100
+++ b/opster.py Wed Dec 29 10:06:42 2010 +0100
@@ -6,7 +6,7 @@
from itertools import imap
__all__ = ['command', 'dispatch']
-__version__ = '1.1'
+__version__ = '1.2'
__author__ = 'Alexander Solovyov'
__email__ = 'piranha@piranha.org.ua'
@@ -181,7 +181,7 @@
if shortlist and not cmd.startswith('^'):
continue # short help contains only marked commands
cmd = cmd.lstrip('^~')
- doc = info[0].__doc__ or '(no help text available)'
+ doc = info[0].__doc__.strip() or '(no help text available)'
hlp[cmd] = doc.splitlines()[0].rstrip()
hlplist = sorted(hlp)
--- a/tests/multicommands.py Tue Dec 07 13:17:55 2010 +0100
+++ b/tests/multicommands.py Wed Dec 29 10:06:42 2010 +0100
@@ -9,7 +9,8 @@
@command(usage='[-t]', shortlist=True)
def simple(ui,
test=('t', False, 'just test execution')):
- '''Just simple command to print keys of received arguments.
+ '''
+ Just simple command to print keys of received arguments.
I assure you! Nothing to look here. ;-)
'''