From 85112aa28896821622248340eff34ec84412c16e Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sat, 3 Jun 2023 17:11:41 +0200 Subject: [PATCH] feat: article on diff-highlight --- knowledge base/diff-highlight.md | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 knowledge base/diff-highlight.md diff --git a/knowledge base/diff-highlight.md b/knowledge base/diff-highlight.md new file mode 100644 index 0000000..65f746f --- /dev/null +++ b/knowledge base/diff-highlight.md @@ -0,0 +1,52 @@ +# `diff-highlight` + +Pretty diff highlighter with emphasis on changed words. + +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## TL;DR + +```sh +# Installation. +pip install 'diff-highlight' +``` + +In `${HOME}/.gitconfig`: + +```ini +# Set as default. +[core] + pager = diff-highlight | less + +# Apply to individual commands. +[pager] + log = diff-highlight | less + show = diff-highlight | less + diff = diff-highlight | less +``` + +## Further readings + +- [Github] +- [PyPi] page +- [Git] + +## Sources + +All the references in the [further readings] section, plus the following: + + +[github]: https://github.com/tk0miya/diff-highlight +[pypi]: https://pypi.org/project/diff-highlight/ + + +[further readings]: #further-readings + + +[git]: git.md + +