commands.sh

highlight

all

Output syntax-highlighted source code to a variety of formats.

More info →

Options (4)

-o, --out-formatboolean

Produce a complete HTML document from a source code file

Example: highlight {{[-o|--out-format]}} {{html}} {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}} {{path/to/source_code}}
-s, --styleboolean

Produce a complete HTML document from a source code file

Example: highlight {{[-o|--out-format]}} {{html}} {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}} {{path/to/source_code}}
-S, --syntaxboolean

Produce a complete HTML document from a source code file

Example: highlight {{[-o|--out-format]}} {{html}} {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}} {{path/to/source_code}}
-f, --fragmentboolean

Produce an HTML fragment, suitable for inclusion in a larger document

Example: highlight {{[-o|--out-format]}} {{html}} {{[-f|--fragment]}} {{[-S|--syntax]}} {{language}} {{source_file}}

Examples (5)

Produce a complete HTML document from a source code file

highlight [-o|--out-format] html [-s|--style] theme_name [-S|--syntax] language path/to/source_code

Produce an HTML fragment, suitable for inclusion in a larger document

highlight [-o|--out-format] html [-f|--fragment] [-S|--syntax] language source_file

Inline the CSS styling in every tag

highlight [-o|--out-format] html --inline-css [-S|--syntax] language source_file

List all supported languages, themes, or plugins

highlight --list-scripts langs|themes|plugins

Print a CSS stylesheet for a theme

highlight [-o|--out-format] html --print-style [-s|--style] theme_name [-S|--syntax] language --stdout
made by @shridhargupta | data from tldr-pages