diff options
| author | Georg Brandl <georg@python.org> | 2021-01-21 22:27:15 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2021-01-21 22:27:15 +0100 |
| commit | 150616e7019ba9255b05ebad6cd646467e888feb (patch) | |
| tree | 2a408ccd6038ef2c29bfee5c0c50e1d76a6ed78d /doc | |
| parent | a44725638565f3814dd806b8a13606eb46fa6c15 (diff) | |
| download | pygments-git-150616e7019ba9255b05ebad6cd646467e888feb.tar.gz | |
update manpage with -g, -N, -C
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/pygmentize.1 | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/pygmentize.1 b/doc/pygmentize.1 index 71bb6f9c..5ac8fe67 100644 --- a/doc/pygmentize.1 +++ b/doc/pygmentize.1 @@ -1,11 +1,11 @@ -.TH PYGMENTIZE 1 "February 15, 2007" +.TH PYGMENTIZE 1 "January 20, 2021" .SH NAME pygmentize \- highlights the input file .SH SYNOPSIS .B \fBpygmentize\fP -.RI [-l\ \fI<lexer>\fP]\ [-F\ \fI<filter>\fP[:\fI<options>\fP]]\ [-f\ \fI<formatter>\fP] +.RI [-l\ \fI<lexer>\fP\ |\ -g]\ [-F\ \fI<filter>\fP[:\fI<options>\fP]]\ [-f\ \fI<formatter>\fP] .RI [-O\ \fI<options>\fP]\ [-P\ \fI<option=value>\fP]\ [-o\ \fI<outfile>\fP]\ [\fI<infile>\fP] .br .B \fBpygmentize\fP @@ -15,6 +15,12 @@ pygmentize \- highlights the input file .RI -L\ [\fI<which>\fP\ ...] .br .B \fBpygmentize\fP +.RI -N\ \fI<filename>\fP +.br +.B \fBpygmentize\fP +.RI -C +.br +.B \fBpygmentize\fP .RI -H\ \fI<type>\fP\ \fI<name>\fP .br .B \fBpygmentize\fP @@ -42,6 +48,10 @@ A summary of options is included below. Set the lexer name. If not given, the lexer is guessed from the extension of the input file name (this obviously doesn't work if the input is stdin). .TP +.B \-g +Attempt to guess the lexer from the file contents, or pass through as plain text +if this fails (this option works for highlighting standard input). +.TP .B \-F \fI<filter>\fP[:\fI<options>\fP] Add a filter to the token stream. You can give options in the same way as for -O after a colon (note: there must not be spaces around the colon). @@ -76,6 +86,14 @@ is formatter dependent and can be found in the documentation. List lexers, formatters, styles or filters. Set \fI<which>\fP to the thing you want to list (e.g. "styles"), or omit it to list everything. .TP +.B \-N \fI<filename>\fP +Guess and print out a lexer name based solely on the given filename. Does not +take input or highlight anything. If no specific lexer can be found, "text" +is printed. +.TP +.B \-C +Like \fI-N\fP, but guess a lexer based on content read from standard input. +.TP .B \-H \fI<type>\fP \fI<name>\fP Print detailed help for the object \fI<name>\fP of type \fI<type>\fP, where \fI<type>\fP is one of "lexer", "formatter" or "filter". |
