summaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2008-11-15 12:31:20 +0100
committergbrandl <devnull@localhost>2008-11-15 12:31:20 +0100
commit69a799f811214acc25f4153ec816cf2ac4fab0d2 (patch)
tree1c186146bd38305805f6621714aa75993b043f1f /docs/src
parentd17c5a35f477a764c035242982d80c230116f71a (diff)
downloadpygments-69a799f811214acc25f4153ec816cf2ac4fab0d2.tar.gz
#372: add -N option to guess lexer name based on file name.
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/cmdline.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/src/cmdline.txt b/docs/src/cmdline.txt
index 4ff74190..ce14a3fd 100644
--- a/docs/src/cmdline.txt
+++ b/docs/src/cmdline.txt
@@ -34,6 +34,7 @@ The above command could therefore also be given as::
$ pygmentize -o test.html test.py
+
Options and filters
-------------------
@@ -80,6 +81,19 @@ For an explanation what ``-a`` means for `a particular formatter`_, look for
the `arg` argument for the formatter's `get_style_defs()` method.
+Getting lexer names
+-------------------
+
+*New in Pygments 1.0.*
+
+The ``-N`` option guesses a lexer name for a given filename, so that ::
+
+ $ pygmentize -N setup.py
+
+will print out ``python``. It won't highlight anything yet. If no specific
+lexer is known for that filename, ``text`` is printed.
+
+
Getting help
------------