GNU Source-highlight
====================

Source-highlight generates syntax-highlighted documents from source files.
It also provides a C++ highlight library.

Language and output format specifications are loaded dynamically, so new
languages and formats can be added without recompiling.

Usage
-----

Basic example:

  source-highlight -s c -f esc sourcefile.c | less -R

View any source file with syntax highlighting through less:

  export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
  export LESS='-R'

Add those lines to your ~/.bash_profile for permanent effect.

Use -f esc256 instead of -f esc if your terminal supports 256 colors.

Added Languages
---------------

This build adds YAML and Markdown support (upstream bug #62751):

  - yaml, yml            -> YAML files
  - md, mkd, markdown    -> Markdown files

Test examples:

  curl -s https://raw.githubusercontent.com/git/git/master/.github/workflows/main.yml \
    | source-highlight -s yaml -f esc | less -R

  curl -s https://raw.githubusercontent.com/git/git/master/README.md \
    | source-highlight -s md -f esc | less -R

Homepage
--------

  https://www.gnu.org/software/src-highlite/
