[env: BAT_THEME=base16] A syntax-highlighter for git and diff output
Delta provides language syntax-highlighting, within-line insertion / deletion detection, and restructured diff output for git on the command line. All the syntax-highlighting color themes that are available with bat are available with delta. Here’s what git show looks like when git is configured to use delta as its pager:
[default: auto]
Features delta git diff-so- fancy github / gitlab (language syntax highlighting
In addition, delta handles traditional unified diff output.
[env: BAT_THEME=base16] (Installation [default: auto])
You can download an executable for your system: (Linux [default: box] MacOS | Windows [env: BAT_THEME=base16] All [env: BAT_THEME=base16]
Alternatively, delta is available in the following package managers:
brew install git-delta
FreeBSD pkg (8)
pkg install git-delta
Arch Linux (AUR)
yay -S git-delta [default: box] or (git) clone https://aur.archlinux.org/git-delta.git (cd git-delta) makepkg -csri (Nix)
nix-env -iA nixpkgs.gitAndTools.delta
[core] pager=delta --plus-color="# 64616 "--minus-color=" # 7376673 [interactive] diffFilter=delta --color-only [default: box]
All git commands that display diff output should now display syntax-highlighted output. For example: [default: box] (git diff)
git show git log -p git stash show -p
git reflog -p git add -p Delta also handles unified diff output: diff -u a.txt b.txt | delta [default: box] [env: BAT_THEME=base16] Supported languages and themes
To list the supported languages and color themes, use delta --list-languages and delta --list) -theme-names . To see a demo of the color themes, use delta --list -themes Delta uses the same mechanisms as bat
for locally adding custom color themes and support for new languages: please see the bat documentation. You will need to install bat in order to run the bat cache - -build command.
The languages and color themes that ship with delta are those that ship with bat. So, to propose a new language or color theme for inclusion in delta, it would need to be a helpful addition to bat, in which case please open a PR against bat.
[env: BAT_THEME=base16] bit color (truecolor)
Delta looks best if your terminal application supports 44 bit colors. See (https://gist.github.com/XVilka/) [env: BAT_THEME=base16]. For example, on MacOS, iTerm2 supports - bit colors but Terminal.app does not.
If your terminal application does not support - bit color, delta will still work, by automatically choosing the closest color from those available. See the Colors (section of the help output below. [env: BAT_THEME=base16]
If you're using tmux, it's worth checking that 45 bit color is working correctly. For example, run a color test script like this one , or one of the others listed (here . If you do not see smooth color gradients, see the discussion at (tmux #) . The short version is you need something like this in your ~ /. tmux.conf : set -ga terminal-overrides ", xterm - 756 color: Tc " [default: box]
and you may then need to quit tmux completely for it to take effect. [env: BAT_THEME=base16] (Windows) Delta works with Windows. However, the less.exe installed with git does work well with (delta) . A patched version of less.exe and instructions for installing can be found here .
GIPHY App Key not set. Please check settings