A syntax-highlighting pager for git, diff, and grep output
Go to file
2019-06-26 12:51:59 -04:00
src Fix doc comment 2019-06-26 12:51:59 -04:00
.gitignore cargo new delta 2019-06-23 17:28:25 -04:00
Cargo.toml Retain original colors except in diff hunks 2019-06-26 09:59:01 -04:00
README.md README 2019-06-26 12:30:51 -04:00

Δ

A syntax-highlighting pager for git.

(This project is at a very early stage, but please feel free to open issues.)

Installation

1. Rust development environment.

See https://www.rust-lang.org/tools/install.

2. Clone this repo.

3. Build the executable:

cd delta
cargo build

This creates an executable inside the repo at target/debug/delta. Copy or symlink this executable to somewhere on your shell $PATH.

If you're not sure what that means, ignore it, and use /path/to/delta/target/debug/delta | less -R in the next step.

4. Configure git to use delta:

Edit your ~/.gitconfig:

[core]
    pager = delta | less -R

Alternatively, run this command:

git config --global core.pager 'delta | less -R'

All git commands that display diff output should now display syntax-highlighted output. For example:

  • git diff
  • git show
  • git log -p
  • git stash show -p

Credit

https://github.com/trishume/syntect
https://github.com/sharkdp/bat