Anonymous avatar Anonymous committed 5760b20

[svn] Make -L output better readable on terminals with less than 150 chars width.

Comments (0)

Files changed (2)

 
 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.

pygments/cmdline.py

     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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.