summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-12-20 21:58:43 +0100
committergbrandl <devnull@localhost>2006-12-20 21:58:43 +0100
commit73d515064810ecd06b12110aff3652279959cb22 (patch)
tree274fa81a6b56c99eeb6ab72d1cc801cfb681a6c3
parent3d8753f454a59e6e447e5cd4e98fa383d9332c67 (diff)
downloadpygments-73d515064810ecd06b12110aff3652279959cb22.tar.gz
[svn] Make -L output better readable on terminals with less than 150 chars width.
-rw-r--r--CHANGES2
-rw-r--r--pygments/cmdline.py8
2 files changed, 3 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 6d0e4678..d605a3b2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,7 +3,7 @@ Pygments changelog
Version 0.6
-----------
-(codename Zimtstern, released Dec XX, 2006)
+(codename Zimtstern, released Dec 20, 2006)
- Added option for the HTML formatter to write the CSS to an external file
in "full document" mode.
diff --git a/pygments/cmdline.py b/pygments/cmdline.py
index 8e1d329a..b70d9e6d 100644
--- a/pygments/cmdline.py
+++ b/pygments/cmdline.py
@@ -75,30 +75,26 @@ def _print_lflist():
print "~~~~~~~"
info = []
- maxlen = 0
for _, fullname, names, exts, _ in LEXERS.itervalues():
tup = (', '.join(names)+':', fullname,
exts and '(extensions ' + ', '.join(exts) + ')' or '')
info.append(tup)
- if len(tup[0]) > maxlen: maxlen = len(tup[0])
info.sort()
for i in info:
- print ('%-'+str(maxlen)+'s %s %s') % i
+ print ('%s\n %s %s') % i
print
print "Formatters:"
print "~~~~~~~~~~~"
info = []
- maxlen = 0
for fullname, names, exts, doc in FORMATTERS.itervalues():
tup = (', '.join(names)+':', doc,
exts and '(extensions ' + ', '.join(exts) + ')' or '')
info.append(tup)
- if len(tup[0]) > maxlen: maxlen = len(tup[0])
info.sort()
for i in info:
- print ('%-'+str(maxlen)+'s %s %s') % i
+ print ('%s\n %s %s') % i
def main(args):