3The following table tries to give an overview *from `bat`s perspective*, i.e. we only compare
4categories which are relevant for `bat`. Some of these projects have completely different goals and
5if you are not looking for a program like `bat`, this comparison might not be for you.
7| | bat | [pygments](http://pygments.org/) | [highlight](http://www.andre-simon.de/doku/highlight/highlight.php) | [ccat](https://github.com/jingweno/ccat) | [source-highlight](https://www.gnu.org/software/src-highlite/) | [hicat](https://github.com/rstacruz/hicat) | [coderay](https://github.com/rubychan/coderay) | [rouge](https://github.com/jneen/rouge) |
8|----------------------------------------------|---------------------------------------------------------------------|----------------------------------|---------------------------------------------------------------------|------------------------------------------|----------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------|
9| Drop-in `cat` replacement | :heavy_check_mark: [*](https://github.com/sharkdp/bat/issues/134) | :x: | :x: | (:heavy_check_mark:) | :x: | :x: [*](https://github.com/rstacruz/hicat/issues/6) | :x: | :x: |
10| Git integration | :heavy_check_mark: | :x: | :x: | :x: | :x: | :x: | :x: | :x: |
11| Automatic paging | :heavy_check_mark: | :x: | :x: | :x: | :x: | :heavy_check_mark: | :x: | :x: |
12| Languages (circa) | 150 | 300 | 200 | 7 | 80 | 130 | 30 | 130 |
13| Extensible (languages, themes) | :heavy_check_mark: | (:heavy_check_mark:) | (:heavy_check_mark:) | :x: | (:heavy_check_mark:) | :x: | :x: | :x: |
14| Advanced highlighting (e.g. nested syntaxes) | :heavy_check_mark: | :heavy_check_mark: | (:heavy_check_mark:) ? | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
15| Execution time [ms] (`jquery-3.3.1.js`) | 624 | 789 | 400 | 80 | 300 | 316 | 157 | 695 |
16| Execution time [ms] (`miniz.c`) | 66 | 656 | 26 | 8 | 53 | 141 | 75 | 254 |
17| Execution time [ms] (370 kB XML file) | 238 | 487 | 129 | 111 | 110 | 339 | 147 | 359 |
19If you think that some entries in this table are outdated or wrong, please open a ticket or pull
22Some other alternatives that are also related, but not yet included in the table:
23- [lesspipe](https://github.com/wofr06/lesspipe)
24- [vimpager](https://github.com/rkitover/vimpager)
28The benchmarks above have been created with this script:
32cd "$(dirname "${BASH_SOURCE[0]}")" || exit
34if ! command -v hyperfine > /dev/null 2>&1; then
35 echo "'hyperfine' does not seem to be installed."
36 echo "You can get it here: https://github.com/sharkdp/hyperfine"
40SRC="test-src/jquery-3.3.1.js"
43cmd_bat="bat --style=full --color=always --paging=never '$SRC'"
44cmd_bat_simple="bat --plain --wrap=never --tabs=0 --color=always --paging=never '$SRC'"
45cmd_pygmentize="pygmentize -g '$SRC'"
46cmd_highlight="highlight -O truecolor '$SRC'"
47cmd_ccat="ccat --color=always '$SRC'"
48cmd_source_highlight="source-highlight --failsafe --infer-lang -f esc -i '$SRC'"
49cmd_hicat="hicat '$SRC'"
50cmd_coderay="coderay '$SRC'"
51cmd_rouge="rougify '$SRC'"
59 "$cmd_source_highlight" \
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list