A syntax-highlighting pager for git, diff, and grep output
This release fixes a performance problem that was affecting some users. See https://github.com/dandavison/delta/issues/824
Fixes a crash that can occur, see for example https://github.com/dandavison/delta/issues/826. Thanks @mrjoel.
Full Changelog: https://github.com/dandavison/delta/compare/0.11.0...0.11.1
This release adds handling of merge conflicts and the "combined" diff format which git uses for merge commits; see the Merge conflicts README section and https://github.com/dandavison/delta/issues/189. Please consider setting
[merge]
conflictstyle = diff3
With that setting, when a merge conflict is encountered, delta will display diffs between the ancestral commit and each of the two merge parents:
Full Changelog: https://github.com/dandavison/delta/compare/0.10.3...0.11.0
--word-diff
and --color-words
output in a nonsensical way. With this release, delta does not attempt to handle these output types, allowing git's raw output through unchanged. Appropriate handling may be added later. See https://github.com/dandavison/delta/issues/152
{plus,minus}-non-emph-style
; previously it assigned {plus,minus}-style
. This change does not alter visual output by default because by default those two style styles are set to the same value. See https://github.com/dandavison/delta/pull/785
side-by-side
mode, see #819Full Changelog: https://github.com/dandavison/delta/compare/0.10.2...0.10.3
This releases fixes a bug when using side-by-side with git diff.colorMoved
. See https://github.com/dandavison/delta/issues/802
Full Changelog: https://github.com/dandavison/delta/compare/0.10.1...0.10.2
This release fixes a bug in color-moved handling when files have DOS line endings. See #800
Full Changelog: https://github.com/dandavison/delta/compare/0.10.0...0.10.1
New features in this release:
git grep
and rg --json ... | delta
with code syntax highlighting and navigate functionality. See README#grep and https://github.com/dandavison/delta/pull/774.git blame
with code syntax highlighting, hyperlinks to commits, and control over formatting. See README#git-blame and https://github.com/dandavison/delta/pull/761.git show $revision:/path/to/file
git --color-moved
. This is done by specifying rules for remapping styles using map-styles
. See below, and README#--color-moved-support and https://github.com/dandavison/delta/issues/72
--show-colors
outputs a demo of 140 background colors with syntax highlighting, to help choose background colors.--parse-ansi
takes color input and prints out the corresponding style strings (useful for map-styles
)Here's an example of using map-styles
to assign delta styles (one with syntax highlighting) to the raw color-moved styles output by git. This should allow all git's color-moved options to be rendered using delta styles:
[delta]
features = my-color-moved-theme
[delta "my-color-moved-theme"]
git-moved-from-style = bold purple # An ad-hoc named style (must end in "-style")
map-styles = "my-color-moved-theme.git-moved-from-style => red #cccccc, \
bold cyan => syntax #cccccc"
# we could also have defined git-moved-to-style = bold cyan
To make use of that, you need to know that git is emitting "bold cyan" and "bold purple". But that's not always obvious. To help with that, delta now has a --parse-ansi
mode. E.g. git show --color=always | delta --parse-ansi
outputs something like this:
As you see above, we can now define named styles in gitconfig and refer to them in places where a style string is expected. We can also define custom named colors in git config, and styles can reference other styles; see the hoopoe theme for an example:
[delta "hoopoe"]
green = "#d0ffd0" # ad-hoc named color
plus-style = syntax hoopoe.green # refer to named color
plus-non-emph-style = plus-style # styles can reference other styles
Additionally, we can now use the 140 color names that are standard in CSS. Use delta --show-colors
to get a demo of the available colors, as background colors to see how they look with syntax highlighting:
Full Changelog: https://github.com/dandavison/delta/compare/0.9.2...0.10.0
This release fixes a regression introduced in 0.9.0 affecting the use of git add -p
when submodules are present. See https://github.com/dandavison/delta/issues/755
git add -p
by @dandavison in https://github.com/dandavison/delta/pull/756
Full Changelog: https://github.com/dandavison/delta/compare/0.9.1...0.9.2
This is a followup to release 0.9.0 fixing a bug in the --help
text emitted by the 0.9.0 binary (see 3aab5d19569fa52ace2d7e6d196a1256990c4e20).
0.9.0 was a major release adding line-wrapping to side-by-side mode: 0.9.0 release notes.
With this release, long lines are wrapped in side-by-side mode, thanks to a far-reaching series of contributions by @th1000s (see https://github.com/dandavison/delta/pull/515). No special customization is needed, but sophisticated control over the details is available: see --wrap-max-lines
, --wrap-left-symbol
, --wrap-right-symbol
, --wrap-right-percent
, --wrap-right-prefix-symbol
, --inline-hint-style
.
In the image below, the long deleted line in the left panel overflows by a small amount, and the wrapped content is right-aligned in the next line. In contrast, the long replacement line in the right panel overflows by almost an entire line, and so the wrapped content is left aligned in the next line. The arrow markers and ellipsis explain when and how text has been wrapped.
git@
for hyperlinks by @spaarmann in https://github.com/dandavison/delta/pull/668
git diff
mode by @dandavison in https://github.com/dandavison/delta/pull/695
insteadOf
replacements in git remote URLs by @dandavison in https://github.com/dandavison/delta/pull/694
Full Changelog: https://github.com/dandavison/delta/compare/0.8.3...0.9.0