Command line argument to determine lexer based on filename only

Issue #372 resolved
Former user created an issue

I'd like pygments to attempt to determine a lexer based only on the filename via the command line. This is useful when the filename is known as well as the contents but the file does not actually exist on disk anywhere.

{{{ [masseria]$ ./pygmentize -N python [masseria]$ ./pygmentize -N java [masseria]$ ./pygmentize -N bash [masseria]$ ./pygmentize -N test.klajdfklj text }}}

I've included a patch to add this functionality.

Reported by JakeWharton

Comments (2)

  1. Log in to comment