Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngzhian/colordiffs
syntax highlighting for git diffs
https://github.com/ngzhian/colordiffs
Last synced: 3 months ago
JSON representation
syntax highlighting for git diffs
- Host: GitHub
- URL: https://github.com/ngzhian/colordiffs
- Owner: ngzhian
- Created: 2015-06-01T03:35:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T13:14:34.000Z (over 1 year ago)
- Last Synced: 2024-10-01T19:24:38.959Z (3 months ago)
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
Awesome Lists containing this project
README
==========
Colordiffs
==========Colors for your git diffs
.. image:: colordiffs.png
Colordiffs is under development, things are bound to be broken.
If you would like to help out, start an issue or submit a pull request :)Installation
============::
pip install colordiffs
How to run
==========::
git diff HEAD^ | colordiffs | less -r
explanation
1. ``git diff HEAD^`` gets a diff between the current and the previous commit
2. ``colordiffs`` reads a diff from stdin
3. ``less -r`` takes the output of colordiffs and uses ``less`` to page it, the ``-r`` is required to interpret the terminal escape codesRequirements
============::
Python 2.x, 3.x
PygmentsTODO
====Support more kinds of `git diff` output. Right not it supports the most common `---` `+++` diffs, but if the diff is for a new file or deletion of file it breaks.