mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
feat: article on diff-highlight
This commit is contained in:
52
knowledge base/diff-highlight.md
Normal file
52
knowledge base/diff-highlight.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# `diff-highlight`
|
||||
|
||||
Pretty diff highlighter with emphasis on changed words.
|
||||
|
||||
## Table of contents <!-- omit in toc -->
|
||||
|
||||
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:
|
||||
|
||||
<!-- project's references -->
|
||||
[github]: https://github.com/tk0miya/diff-highlight
|
||||
[pypi]: https://pypi.org/project/diff-highlight/
|
||||
|
||||
<!-- in-article references -->
|
||||
[further readings]: #further-readings
|
||||
|
||||
<!-- internal references -->
|
||||
[git]: git.md
|
||||
|
||||
<!-- external references -->
|
||||
Reference in New Issue
Block a user