Mercurial > hg
diff mercurial/help.py @ 9295:b0f447a259ab
help: use field lists for lists of extensions
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 03 Aug 2009 00:01:50 +0200 |
parents | 5f4862a00697 |
children | 8a254bd61224 |
line wrap: on
line diff
--- a/mercurial/help.py Sun Aug 02 23:38:08 2009 +0200 +++ b/mercurial/help.py Mon Aug 03 00:01:50 2009 +0200 @@ -43,11 +43,9 @@ '''return a text listing of the given extensions''' if not exts: return '' - # TODO: literal block is wrong, should be a field list or a simple table. - result = '\n%s\n\n ::\n\n' % header + result = '\n%s\n\n' % header for name, desc in sorted(exts.iteritems()): - desc = util.wrap(desc, maxlength + 5) - result += ' %s %s\n' % (name.ljust(maxlength), desc) + result += ' %-*s %s\n' % (maxlength + 2, ':%s:' % name, desc) return result def extshelp():