summaryrefslogtreecommitdiffstats
path: root/manual/src/tips-and-tricks/export-to-html.md
blob: 26ae9798b317df2b090fd54385b3cd180706eb81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Save output with colors to HTML/PDF etc

Install [ansifilter](https://formulae.brew.sh/formula/ansifilter).

```sh
git show \
    | delta --no-gitconfig --file-decoration-style blue --hunk-header-decoration-style blue \
    | ansifilter --html \
    > /tmp/diff.html
```

Now open `/tmp/diff.html` in a web browser, print to PDF, etc.

Remove the `--no-gitconfig` above to use your own delta style, but not that `ansifilter` does not handle hyperlinks or decoration boxes etc.