Ticket #372 (closed enhancement: fixed)
Command line argument to determine lexer based on filename only
| Reported by: | JakeWharton | Owned by: | gbrandl |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.0 |
| Component: | other | Keywords: | |
| Cc: |
Description
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 test.py python [masseria]$ ./pygmentize -N test.java java [masseria]$ ./pygmentize -N test.sh bash [masseria]$ ./pygmentize -N test.klajdfklj text
I've included a patch to add this functionality.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.