summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordandavison <>2022-01-25 17:08:09 +0000
committerdandavison <>2022-01-25 17:08:09 +0000
commit2b03fe1a1d71f210a58e673dfa3b11a779339386 (patch)
treeb23b0739da1864bfe9d307738f36a7637e130e35
parentf24565a518b83a20a30ab10e1112366e1aa0009b (diff)
Deploying to gh-pages from @ dandavison/delta@603b80724200b31a35ac6bed6f9e160b922e0f40 🚀
-rw-r--r--color-moved-support.html5
-rw-r--r--print.html5
-rw-r--r--searchindex.js2
-rw-r--r--searchindex.json2
4 files changed, 12 insertions, 2 deletions
diff --git a/color-moved-support.html b/color-moved-support.html
index 174f524a..c6fc9e70 100644
--- a/color-moved-support.html
+++ b/color-moved-support.html
@@ -147,6 +147,11 @@ This feature allows all of git's color-moved options to be rendered using delta
<pre><code class="language-gitconfig">[delta]
map-styles = bold purple =&gt; syntax magenta, bold cyan =&gt; syntax blue
</code></pre>
+<p>There is a pair of features provided in <a href="https://github.com/chtenb/delta/blob/master/themes.gitconfig">themes.config</a> called <code>zebra-dark</code> and <code>zebra-light</code> which utilise the moved colors by displaying them as a faint background color on the affected lines while keeping syntax highlighting as the foreground color. You can enable one of these features by stacking it upon the theme you are using.</p>
+<table><tr>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756321-d9e885fe-206c-4e08-8c40-e0ed5969b04a.png" alt="image" /></td>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756332-ce8a4e2a-7487-4880-a151-761872657a28.png" alt="image" /></td>
+</tr></table>
<p>It is also possible to reference other styles.</p>
<pre><code class="language-gitconfig">[delta]
features = my-color-moved-theme
diff --git a/print.html b/print.html
index 4745d539..8aaa4848 100644
--- a/print.html
+++ b/print.html
@@ -447,6 +447,11 @@ This feature allows all of git's color-moved options to be rendered using delta
<pre><code class="language-gitconfig">[delta]
map-styles = bold purple =&gt; syntax magenta, bold cyan =&gt; syntax blue
</code></pre>
+<p>There is a pair of features provided in <a href="https://github.com/chtenb/delta/blob/master/themes.gitconfig">themes.config</a> called <code>zebra-dark</code> and <code>zebra-light</code> which utilise the moved colors by displaying them as a faint background color on the affected lines while keeping syntax highlighting as the foreground color. You can enable one of these features by stacking it upon the theme you are using.</p>
+<table><tr>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756321-d9e885fe-206c-4e08-8c40-e0ed5969b04a.png" alt="image" /></td>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756332-ce8a4e2a-7487-4880-a151-761872657a28.png" alt="image" /></td>
+</tr></table>
<p>It is also possible to reference other styles.</p>
<pre><code class="language-gitconfig">[delta]
features = my-color-moved-theme
diff --git a/searchindex.js b/searchindex.js
index cb942a93..b12762f0 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Object.assign(window.search, {"doc_urls":["introduction.html#a-syntax-highlighting-pager-for-git-diff-and-grep-output","get-started.html#get-started","features.html#features","installation.html#installation","configuration.html#configuration","configuration.html#git-config-file","how-delta-works.html#how-delta-works","usage.html#usage","choosing-colors-styles.html#choosing-colors-styles","line-numbers.html#line-numbers","side-by-side-view.html#side-by-side-view","grep.html#grep","features-named-groups-of-settings.html#features-named-groups-of-settings","custom-themes.html#custom-themes","diff-highlight-and-diff-so-fancy-emulation.html#diff-highlight-and-diff-so-fancy-emulation","color-moved-support.html#--color-moved-support","navigation-keybindings-for-large-diffs.html#navigation-keybindings-for-large-diffs","merge-conflicts.html#merge-conflicts","git-blame.html#git-blame","24-bit-color-truecolor.html#24-bit-color-truecolor","using-delta-with-gnu-screen.html#using-delta-with-gnu-screen","using-delta-on-windows.html#using-delta-on-windows","mouse-scrolling.html#mouse-scrolling","using-delta-with-magit.html#using-delta-with-magit","supported-languages-and-themes.html#supported-languages-and-themes","comparisons-with-other-tools.html#comparisons-with-other-tools","build-delta-from-source.html#build-delta-from-source","related-projects.html#related-projects","related-projects.html#used-by-delta","related-projects.html#using-delta","related-projects.html#similar-projects","full---help-output.html#full---help-output","delta-configs-used-in-screenshots.html#delta-configs-used-in-screenshots","delta-configs-used-in-screenshots.html#side-by-side-view","side-by-side-view-1.html#side-by-side-view"],"index":{"documentStore":{"docInfo":{"0":{"body":37,"breadcrumbs":8,"title":7},"1":{"body":20,"breadcrumbs":2,"title":1},"10":{"body":123,"breadcrumbs":7,"title":3},"11":{"body":101,"breadcrumbs":3,"title":1},"12":{"body":103,"breadcrumbs":9,"title":4},"13":{"body":119,"breadcrumbs":5,"title":2},"14":{"body":101,"breadcrumbs":11,"title":5},"15":{"body":238,"breadcrumbs":7,"title":3},"16":{"body":29,"breadcrumbs":9,"title":4},"17":{"body":56,"breadcrumbs":5,"title":2},"18":{"body":20,"breadcrumbs":5,"title":2},"19":{"body":127,"breadcrumbs":9,"title":4},"2":{"body":153,"breadcrumbs":2,"title":1},"20":{"body":89,"breadcrumbs":9,"title":4},"21":{"body":28,"breadcrumbs":7,"title":3},"22":{"body":45,"breadcrumbs":5,"title":2},"23":{"body":12,"breadcrumbs":7,"title":3},"24":{"body":82,"breadcrumbs":7,"title":3},"25":{"body":14,"breadcrumbs":4,"title":2},"26":{"body":27,"breadcrumbs":6,"title":3},"27":{"body":0,"breadcrumbs":4,"title":2},"28":{"body":7,"breadcrumbs":4,"title":2},"29":{"body":9,"breadcrumbs":4,"title":2},"3":{"body":156,"breadcrumbs":2,"title":1},"30":{"body":15,"breadcrumbs":4,"title":2},"31":{"body":3169,"breadcrumbs":6,"title":3},"32":{"body":0,"breadcrumbs":8,"title":4},"33":{"body":67,"breadcrumbs":7,"title":3},"34":{"body":67,"breadcrumbs":10,"title":3},"4":{"body":0,"breadcrumbs":2,"title":1},"5":{"body":172,"breadcrumbs":4,"title":3},"6":{"body":156,"breadcrumbs":4,"title":2},"7":{"body":0,"breadcrumbs":2,"title":1},"8":{"body":48,"breadcrumbs":7,"title":3},"9":{"body":25,"breadcrumbs":5,"title":2}},"docs":{"0":{"body":"Code evolves, and we all spend time studying diffs. Delta aims to make this both efficient and enjoyable: it allows you to make extensive changes to the layout and styling of diffs, as well as allowing you to stay arbitrarily close to the default git/diff output. delta with line-numbers activated delta with side-by-side and line-numbers activated","breadcrumbs":"Introduction » A syntax-highlighting pager for git, diff, and grep output","id":"0","title":"A syntax-highlighting pager for git, diff, and grep output"},"1":{"body":"Install delta and add this to your ~/.gitconfig: [core] pager = delta [interactive] diffFilter = delta --color-only [delta] navigate = true [merge] conflictstyle = diff3 [diff] colorMoved = default","breadcrumbs":"Get started » Get started","id":"1","title":"Get started"},"10":{"body":"[delta] side-by-side = true By default, side-by-side view has line-numbers activated, and has syntax highlighting in both the left and right panels: [ config ] To disable the line numbers in side-by-side view, but keep a vertical delimiter line between the left and right panels, use the line-numbers format options. For example: [delta] side-by-side = true line-numbers-left-format = \"\" line-numbers-right-format = \"│ \" Long lines are wrapped if they do not fit in side-by-side mode. 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. For control over the details of line wrapping, see --wrap-max-lines, --wrap-left-symbol, --wrap-right-symbol, --wrap-right-percent, --wrap-right-prefix-symbol, --inline-hint-style. Line wrapping was implemented by @th1000s.","breadcrumbs":"Usage » Side-by-side view » Side-by-side view","id":"10","title":"Side-by-side view"},"11":{"body":"Delta applies syntax-highlighting and other enhancements to standard grep output such as from git grep, ripgrep (aka rg), grep, etc. To use with git grep, set delta as the pager for grep in the [pager] section of your gitconfig. See the example at the top of the page . Output from other grep tools can be piped to delta: e.g. rg -Hn --color=always, grep -Hn --color=always, etc. To customize the colors and syntax highlighting, see grep-match-line-style, grep-match-word-style, grep-contexct-line-style, grep-file-style, grep-line-number-style. Ripgrep's rg --json output format is supported; this avoids certain file name parsing ambiguities that are inevitable with the standard grep output formats. Note that git grep can display the \"function context\" for matches and that delta handles this output specially: see the -p and -W options of git grep.","breadcrumbs":"Usage » Grep » Grep","id":"11","title":"Grep"},"12":{"body":"All delta options can go under the [delta] section in your git config file. However, you can also use named \"features\" to keep things organized: these are sections in git config like [delta \"my-feature\"]. Here's an example using two custom features: [delta] features = unobtrusive-line-numbers decorations whitespace-error-style = 22 reverse [delta \"unobtrusive-line-numbers\"] line-numbers = true line-numbers-minus-style = \"#444444\" line-numbers-zero-style = \"#444444\" line-numbers-plus-style = \"#444444\" line-numbers-left-format = \"{nm:>4}┊\" line-numbers-right-format = \"{np:>4}│\" line-numbers-left-style = blue line-numbers-right-style = blue [delta \"decorations\"] commit-decoration-style = bold yellow box ul file-style = bold yellow ul file-decoration-style = none hunk-header-decoration-style = yellow box","breadcrumbs":"Usage » \"Features\": named groups of settings » \"Features\": named groups of settings","id":"12","title":"\"Features\": named groups of settings"},"13":{"body":"A \"theme\" in delta is just a collection of settings grouped together in a named feature . One of the available settings is syntax-theme: this dictates the colors and styles that are applied to foreground text by the syntax highlighter. Thus the concept of \"theme\" in delta encompasses not just the foreground syntax-highlighting color theme, but also background colors, decorations such as boxes and under/overlines, etc. The delta git repo contains a collection of themes created by users. These focus on the visual appearance: colors etc. If you want features like side-by-side or navigate, you would set that yourself, after selecting the color theme. To use the delta themes, clone the delta repo (or download the raw themes.gitconfig file) and add the following entry in your gitconfig: [include] path = /PATH/TO/delta/themes.gitconfig Then, add your chosen color theme to your features list, e.g. [delta] features = collared-trogon side-by-side = true ... Note that this terminology differs from bat : bat does not apply background colors, and uses the term \"theme\" to refer to what delta calls syntax-theme. Delta does not have a setting named \"theme\": a theme is a \"feature\", so one uses features to select a theme.","breadcrumbs":"Usage » Custom themes » Custom themes","id":"13","title":"Custom themes"},"14":{"body":"Use --diff-highlight or --diff-so-fancy to activate the respective emulation mode. You may want to know which delta configuration values the emulation mode has selected, so that you can adjust them. To do that, use e.g. delta --diff-so-fancy --show-config: diff-highlight is a perl script distributed with git that allows within-line edits to be identified and highlighted according to colors specified in git config. diff-so-fancy builds on diff-highlight, making various additional improvements to the default git diff output. Both tools provide very helpful ways of viewing diffs, and so delta provides emulation modes for both of them. The within-line highlighting rules employed by diff-highlight (and therefore by diff-so-fancy) are deliberately simpler than Delta's Levenshtein-type edit inference algorithm (see discussion in the diff-highlight README ). diff-highlight's rules could be added to delta as an alternative highlighting algorithm, but that hasn't been done yet.","breadcrumbs":"Usage » diff-highlight and diff-so-fancy emulation » diff-highlight and diff-so-fancy emulation","id":"14","title":"diff-highlight and diff-so-fancy emulation"},"15":{"body":"Recent versions of Git (≥ v2.17, April 2018) are able to detect moved blocks of code and style them differently from the usual removed/added lines. If you have activated this feature in Git, then Delta will automatically detect such differently-styled lines, and display them unchanged, i.e. with the raw colors it receives from Git. To activate the Git feature, use [diff] colorMoved = default and see the Git documentation for the other possible values and associated color configuration. The map-styles option allows us to transform the styles that git emits for color-moved sections into delta styles. Here's an example of using map-styles to assign delta styles to the raw color-moved styles output by git. This feature allows all of git's color-moved options to be rendered using delta styles, including with syntax highlighting. [delta] map-styles = bold purple => syntax magenta, bold cyan => syntax blue It is also possible to reference other 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:","breadcrumbs":"Usage » --color-moved support » --color-moved support","id":"15","title":"--color-moved support"},"16":{"body":"Use the navigate feature to activate navigation keybindings. In this mode, pressing n will jump forward to the next file in the diff, and N will jump backwards. If you are viewing multiple commits (e.g. via git log -p) then navigation will also visit commit boundaries.","breadcrumbs":"Usage » Navigation keybindings for large diffs » Navigation keybindings for large diffs","id":"16","title":"Navigation keybindings for large diffs"},"17":{"body":"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: This display can be customized using merge-conflict-begin-symbol, merge-conflict-end-symbol, merge-conflict-ours-diff-header-style, merge-conflict-ours-diff-header-decoration-style, merge-conflict-theirs-diff-header-style, merge-conflict-theirs-diff-header-decoration-style.","breadcrumbs":"Usage » Merge conflicts » Merge conflicts","id":"17","title":"Merge conflicts"},"18":{"body":"Set delta as the pager for blame in the [pager] section of your gitconfig: see the example gitconfig . If hyperlinks is enabled in the [delta] section then each blame commit will link to the commit on GitHub/GitLab/Bitbucket/etc.","breadcrumbs":"Usage » Git blame » Git blame","id":"18","title":"Git blame"},"19":{"body":"Delta looks best if your terminal application supports 24 bit colors. See https://github.com/termstandard/colors#readme. For example, on MacOS, iTerm2 supports 24-bit colors but Terminal.app does not. If your terminal application does not support 24-bit color, delta will still work, by automatically choosing the closest color from those available. See the Colors section of the help output below. If you're using tmux, it's worth checking that 24 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#696 . The short version is you need something like this in your ~/.tmux.conf: set -ga terminal-overrides \",xterm-256color:Tc\" and you may then need to quit tmux completely for it to take effect. True color output in GNU Screen is currently only possible when using a development build, as support for it is not yet implemented in the (v4) release versions. A snapshot of the latest Git trunk can be obtained via https://git.savannah.gnu.org/cgit/screen.git/snapshot/screen-master.tar.gz - the required build steps are described in the src/INSTALL file. After installing the program, 24-bit color support can be activated by including truecolor on in either the system's or the user's screenrc file.","breadcrumbs":"Usage » 24 bit color (truecolor) » 24 bit color (truecolor)","id":"19","title":"24 bit color (truecolor)"},"2":{"body":"Language syntax highlighting with color themes Within-line highlights based on a Levenshtein edit inference algorithm Side-by-side view with line-wrapping Line numbering n and N keybindings to move between files in large diffs, and between diffs in log -p views (--navigate) Improved merge conflict display Improved git blame display (syntax highlighting; --hyperlinks formats commits as links to GitHub/GitLab/Bitbucket etc) Syntax-highlights grep output from rg, git grep, grep, etc Support for Git's --color-moved feature. Code can be copied directly from the diff (-/+ markers are removed by default). diff-highlight and diff-so-fancy emulation modes Commit hashes can be formatted as terminal hyperlinks to the GitHub/GitLab/Bitbucket page (--hyperlinks). File paths can also be formatted as hyperlinks for opening in your OS. Stylable box/line decorations to draw attention to commit, file and hunk header sections. Git style strings (foreground color, background color, font attributes) are supported for >20 stylable elements delta git diff-so-fancy / diff-highlight github/gitlab language syntax highlighting ✅ ❌ ❌ ✅ within-line insertion/deletion detection ✅ ❌ ✅ ✅ multiple insertion/deletions detected per line ✅ ❌ ❌ ✅ matching of unequal numbers of changed lines ✅ ❌ ❌ ❌ independently stylable elements ✅ ✅ ✅ ❌ line numbering ✅ ❌ ❌ ✅ side-by-side view ✅ ❌ ❌ ✅ In addition, delta handles traditional unified diff output.","breadcrumbs":"Features » Features","id":"2","title":"Features"},"20":{"body":"When working in Screen without true color output, it might be that colors supposed to be different look the same in XTerm compatible terminals. If that is the case, make sure the following settings are included in your screenrc file: term screen-256color\ntermcapinfo xterm 'Co#256:AB=\\E[48;5;%dm:AF=\\E[38;5;%dm' # ANSI (256-color) patterns - AB: background, AF: foreground\nattrcolor b \".I\" # use bright colors for bold text If despite having those settings you still only get a limited set of colors, your build of Screen might have been configured without the --enable-colors256 flag. If this is the case, you have two options : If available for your OS, get a different package of Screen. Otherwise Build your own binary : Download and extract a release tarball from https://ftp.gnu.org/gnu/screen/ cd into the newly extracted folder Follow the instructions in the INSTALL file, and when running the ./configure command apply the --enable-colors256 flag.","breadcrumbs":"Usage » Using Delta with GNU Screen » Using Delta with GNU Screen","id":"20","title":"Using Delta with GNU Screen"},"21":{"body":"Delta works on Windows. However, it is essential to use a recent version of less.exe: you can download one from https://github.com/jftuga/less-Windows/releases/latest. If you see incorrect colors and/or strange characters in Delta output, then it is probably because Delta is picking up an old version of less.exe on your system.","breadcrumbs":"Usage » Using Delta on Windows » Using Delta on Windows","id":"21","title":"Using Delta on Windows"},"22":{"body":"If mouse scrolling isn't working correctly, ensure that you have the most recent version of less. For Windows you can download from https://github.com/jftuga/less-Windows/releases/latest For Mac you can install brew install less; brew link less Alternatively try setting your DELTA_PAGER environment variable to (at least) less -R. See issue #58 . See also bat README / \"Using a different pager\" , since the DELTA_PAGER environment variable functions very similarly for delta.","breadcrumbs":"Usage » Mouse scrolling » Mouse scrolling","id":"22","title":"Mouse scrolling"},"23":{"body":"Delta can be used when displaying diffs in the Magit git client: see magit-delta . Here's a screenshot:","breadcrumbs":"Usage » Using Delta with Magit » Using Delta with Magit","id":"23","title":"Using Delta with Magit"},"24":{"body":"To list the supported languages and color themes, use delta --list-languages and delta --list-syntax-themes. To see a demo of the color themes, use delta --show-syntax-themes: To add your own custom color theme, or language, please follow the instructions in the Customization section of the bat documentation : Adding a custom language Adding a custom theme Delta automatically recognizes custom themes and languages added to bat. 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.","breadcrumbs":"Usage » Supported languages and themes » Supported languages and themes","id":"24","title":"Supported languages and themes"},"25":{"body":"(delta --light) delta vs. git delta vs. diff-so-fancy /diff-highlight delta vs. github","breadcrumbs":"Comparisons with other tools » Comparisons with other tools","id":"25","title":"Comparisons with other tools"},"26":{"body":"You'll need to install the rust tools . Then: cargo build --release and use the executable found at ./target/release/delta. Alternatively, homebrew users can do brew install --HEAD git-delta to install the development version of delta with merged but unreleased changes.","breadcrumbs":"Build delta from source » Build delta from source","id":"26","title":"Build delta from source"},"27":{"body":"","breadcrumbs":"Related projects » Related projects","id":"27","title":"Related projects"},"28":{"body":"alacritty/vte mitsuhiko/console ogham/rust-ansi-term sharkdp/bat trishume/syntect","breadcrumbs":"Related projects » Used by delta","id":"28","title":"Used by delta"},"29":{"body":"bigH/git-fuzzy dandavison/magit-delta jesseduffield/lazygit junegunn/fzf.vim ms-jpq/sad wfxr/forgit","breadcrumbs":"Related projects » Using delta","id":"29","title":"Using delta"},"3":{"body":"You can download an executable for your system: Linux (glibc) | Linux (musl) | MacOS | Windows | All Alternatively you can install delta using a package manager: see repology.org/git-delta . Note that the package is often called git-delta, but the executable installed is called delta. Here is a quick sumary for selected package managers: Arch Linux pacman -S git-delta Cargo cargo install git-delta Fedora dnf install git-delta FreeBSD pkg install git-delta Gentoo emerge dev-util/git-delta Homebrew brew install git-delta MacPorts port install git-delta Nix nix-env -iA nixpkgs.delta OpenBSD pkg_add delta openSUSE Tumbleweed zypper install git-delta Void Linux xbps-install -S delta Windows (Chocolatey) choco install delta Windows (Scoop) scoop install delta Debian / Ubuntu dpkg -i file.deb .deb files are on the releases page. If you are using Ubuntu &lt;= 19.10 or are mixing apt sources, please read #504. Users of older MacOS versions (e.g. 10.11 El Capitan) should install using Homebrew, Cargo, or MacPorts: the binaries on the release page will not work. Behind the scenes, delta uses less for paging. It's important to have a reasonably recent version of less installed. On MacOS, install less from Homebrew. For Windows, see Using Delta on Windows .","breadcrumbs":"Installation » Installation","id":"3","title":"Installation"},"30":{"body":"banga/git-split-diffs da-x/fancydiff git/diff-highlight jeffkaufman/icdiff kovidgoyal/kitty-diff mookid/diffr nkouevda/pdiff so-fancy/diff-so-fancy Wilfred/difftastic","breadcrumbs":"Related projects » Similar projects","id":"30","title":"Similar projects"},"31":{"body":"delta 0.12.0\nA viewer for git and diff output USAGE: delta [OPTIONS] [ARGS] ARGS: <MINUS_FILE> First file to be compared when delta is being used in diff mode `delta file_1 file_2` is equivalent to `diff -u file_1 file_2 | delta`. <PLUS_FILE> Second file to be compared when delta is being used in diff mode OPTIONS: --blame-code-style <STYLE> Style string for the code section of a git blame line. By default the code will be syntax-highlighted with the same background color as the blame format section of the line (the background color is determined by blame-palette). E.g. setting this option to 'syntax' will syntax-highlight the code with no background color. --blame-format <FMT> Format string for git blame commit metadata. Available placeholders are \"{timestamp}\", \"{author}\", and \"{commit}\". [default: \"{timestamp:<15} {author:<15.14} {commit:<8}\"] --blame-palette <COLORS> Background colors used for git blame lines (space-separated string). Lines added by the same commit are painted with the same color; colors are recycled as needed. --blame-separator-format <FMT> Separator between the blame format and the code section of a git blame line. Contains the line number by default. Possible values are \"none\" to disable line numbers or a format string. This may contain one \"{n:}\" placeholder and will display the line number on every line. A type may be added after all other format specifiers and can be separated by '_': If type is set to 'block' (e.g. \"{n:^4_block}\") the line number will only be shown when a new blame block starts; or if it is set to 'every-N' the line will be show with every block and every N-th (modulo) line. [default: │{n:^4}│] --blame-separator-style <STYLE> Style string for the blame-separator-format --blame-timestamp-format <FMT> Format of `git blame` timestamp in raw git output received by delta [default: \"%Y-%m-%d %H:%M:%S %z\"] --color-only Do not alter the input structurally in any way. But color and highlight hunk lines according to your delta configuration. This is mainly intended for other tools that use delta. --commit-decoration-style <STYLE> Style string for the commit hash decoration. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the combination 'ul ol'. [default: ] --commit-regex <REGEX> Regular expression used to identify the commit line when parsing git output [default: \"^commit \"] --commit-style <STYLE> Style string for the commit hash line. See STYLES section. The style 'omit' can be used to remove the commit hash line from the output. [default: raw] --dark Use default colors appropriate for a dark terminal background. For more control, see the style options and --syntax-theme. --default-language <LANG> Default language used for syntax highlighting. Used when the language cannot be inferred from a filename. It will typically make sense to set this in per-repository git config (.git/config) --diff-highlight Emulate diff-highlight. (https://github.com/git/git/tree/master/contrib/diff-highlight) --diff-so-fancy Emulate diff-so-fancy. (https://github.com/so-fancy/diff-so-fancy) --diff-stat-align-width <N> Width allocated for file paths in a diff stat section. If a relativized file path exceeds this width then the diff stat will be misaligned. [default: 48] --features <FEATURES> Names of delta features to activate (space-separated). A feature is a named collection of delta options in ~/.gitconfig. See FEATURES section. The environment variable DELTA_FEATURES can be set to a space-separated list of feature names. If this is preceded with a space, the features from the environment variable will be added to those specified in git config. E.g. DELTA_FEATURES=+side-by-side can be used to activate side-by-side temporarily. --file-added-label <STRING> Text to display in front of an added file path. Used in the default value of navigate-regex. [default: added:] --file-copied-label <STRING> Text to display in front of a copied file path [default: copied:] --file-decoration-style <STYLE> Style string for the file decoration. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the combination 'ul ol'. [default: \"blue ul\"] --file-modified-label <STRING> Text to display in front of a modified file path. Used in the default value of navigate-regex. [default: ] --file-removed-label <STRING> Text to display in front of a removed file path. Used in the default value of navigate-regex. [default: removed:] --file-renamed-label <STRING> Text to display in front of a renamed file path. Used in the default value of navigate-regex. [default: renamed:] --file-style <STYLE> Style string for the file section. See STYLES section. The style 'omit' can be used to remove the file section from the output. [default: blue] --file-transformation <SED_CMD> Sed-style command transforming file paths for display --grep-context-line-style <STYLE> Style string for non-matching lines of grep output. See STYLES section. Defaults to zero-style. --grep-file-style <STYLE> Style string for file paths in grep output. See STYLES section. Defaults to hunk-header-file-path-style. --grep-line-number-style <STYLE> Style string for line numbers in grep output. See STYLES section. Defaults to hunk-header-line-number-style. --grep-match-line-style <STYLE> Style string for matching lines of grep output. See STYLES section. Defaults to plus-style. --grep-match-word-style <STYLE> Style string for the matching substrings within a matching line of grep output. See STYLES section. Defaults to plus-style. --grep-separator-symbol <STRING> Separator symbol printed after the file path and line number in grep output. Defaults to \":\" for both match and context lines, since many terminal emulators recognize constructs like \"/path/to/file:7:\". However, standard grep output uses \"-\" for context lines: set this option to \"keep\" to keep the original separator symbols. [default: :] --hunk-header-decoration-style <STYLE> Style string for the hunk-header decoration. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the combination 'ul ol'. [default: \"blue box\"] --hunk-header-file-style <STYLE> Style string for the file path part of the hunk-header. See STYLES section. The file path will only be displayed if hunk-header-style contains the 'file' special attribute. [default: blue] --hunk-header-line-number-style <STYLE> Style string for the line number part of the hunk-header. See STYLES section. The line number will only be displayed if hunk-header-style contains the 'line-number' special attribute. [default: blue] --hunk-header-style <STYLE> Style string for the hunk-header. See STYLES section. Special attributes 'file' and 'line-number' can be used to include the file path, and number of first hunk line, in the hunk header. The style 'omit' can be used to remove the hunk header section from the output. [default: \"line-number syntax\"] --hunk-label <STRING> Text to display in front of a hunk header. Used in the default value of navigate-regex. [default: ] --hyperlinks Render commit hashes, file names, and line numbers as hyperlinks. Following the hyperlink spec for terminal emulators: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda. By default, file names and line numbers link to the local file using a file URL, whereas commit hashes link to the commit in GitHub, if the remote repository is hosted by GitHub. See --hyperlinks-file-link-format for full control over the file URLs emitted. Hyperlinks are supported by several common terminal emulators. To make them work, you must use less version >= 581 with the -R flag (or use -r with older less versions, but this will break e.g. --navigate). If you use tmux, then you will also need a patched fork of tmux (see https://github.com/dandavison/tmux). --hyperlinks-commit-link-format <FMT> Format string for commit hyperlinks (requiraes --hyperlinks). The placeholder \"{commit}\" will be replaced by the commit hash. For example: --hyperlinks-commit-link-format='https://mygitrepo/{commit}/' --hyperlinks-file-link-format <FMT> Format string for file hyperlinks (requires --hyperlinks). The placeholders \"{path}\" and \"{line}\" will be replaced by the absolute file path and the line number, respectively. The default value of this option creates hyperlinks using standard file URLs; your operating system should open these in the application registered for that file type. However, these do not make use of the line number. In order for the link to open the file at the correct line number, you could use a custom URL format such as \"file-line://{path}:{line}\" and register an application to handle the custom \"file-line\" URL scheme by opening the file in your editor/IDE at the indicated line number. See https://github.com/dandavison/open-in-editor for an example. [default: file://{path}] --inline-hint-style <STYLE> Style string for short inline hint text. This styles certain content added by delta to the original diff such as special characters to highlight tabs, and the symbols used to indicate wrapped lines. See STYLES section. [default: blue] --inspect-raw-lines <true|false> Kill-switch for --color-moved support. Whether to examine ANSI color escape sequences in raw lines received from Git and handle lines colored in certain ways specially. This is on by default: it is how Delta supports Git's --color-moved feature. Set this to \"false\" to disable this behavior. [default: true] --keep-plus-minus-markers Prefix added/removed lines with a +/- character, as git does. By default, delta does not emit any prefix, so code can be copied directly from delta's output. --light Use default colors appropriate for a light terminal background. For more control, see the style options and --syntax-theme. --line-buffer-size <N> Size of internal line buffer. Delta compares the added and removed versions of nearby lines in order to detect and highlight changes at the level of individual words/tokens. Therefore, nearby lines must be buffered internally before they are painted and emitted. Increasing this value might improve highlighting of some large diff hunks. However, setting this to a high value will adversely affect delta's performance when entire files are added/removed. [default: 32] --line-fill-method <STRING> Line-fill method in side-by-side mode. How to extend the background color to the end of the line in side-by-side mode. Can be ansi (default) or spaces (default if output is not to a terminal). Has no effect if --width=variable is given. -n, --line-numbers Display line numbers next to the diff. See LINE NUMBERS section. --line-numbers-left-format <FMT> Format string for the left column of line numbers. A typical value would be \"{nm:^4}⋮\" which means to display the line numbers of the minus file (old version), center-aligned, padded to a width of 4 characters, followed by a dividing character. See the LINE NUMBERS section. [default: {nm:^4}⋮] --line-numbers-left-style <STYLE> Style string for the left column of line numbers. See STYLES and LINE NUMBERS sections. [default: auto] --line-numbers-minus-style <STYLE> Style string for line numbers in the old (minus) version of the file. See STYLES and LINE NUMBERS sections. [default: auto] --line-numbers-plus-style <STYLE> Style string for line numbers in the new (plus) version of the file. See STYLES and LINE NUMBERS sections. [default: auto] --line-numbers-right-format <FMT> Format string for the right column of line numbers. A typical value would be \"{np:^4}│ \" which means to display the line numbers of the plus file (new version), center-aligned, padded to a width of 4 characters, followed by a dividing character, and a space. See the LINE NUMBERS section. [default: {np:^4}│] --line-numbers-right-style <STYLE> Style string for the right column of line numbers. See STYLES and LINE NUMBERS sections. [default: auto] --line-numbers-zero-style <STYLE> Style string for line numbers in unchanged (zero) lines. See STYLES and LINE NUMBERS sections. [default: auto] --list-languages List supported languages and associated file extensions --list-syntax-themes List available syntax-highlighting color themes --map-styles <STYLES_MAP> Map styles encountered in raw input to desired output styles. An example is --map-styles='bold purple => red \"#eeeeee\", bold cyan => syntax \"#eeeeee\"' --max-line-distance <DIST> Maximum line pair distance parameter in within-line diff algorithm. This parameter is the maximum distance (0.0 - 1.0) between two lines for them to be inferred to be homologous. Homologous line pairs are highlighted according to the deletion and insertion operations transforming one into the other. [default: 0.6] --max-line-length <N> Truncate lines longer than this. To prevent any truncation, set to zero. Note that delta will be slow on very long lines (e.g. minified .js) if truncation is disabled. When wrapping lines it is automatically set to fit at least all visible characters. [default: 512] --merge-conflict-begin-symbol <STRING> String marking the beginning of a merge conflict region. The string will be repeated until it reaches the required length. [default: ▼] --merge-conflict-end-symbol <STRING> String marking the end of a merge conflict region. The string will be repeated until it reaches the required length. [default: ▲] --merge-conflict-ours-diff-header-decoration-style <STYLE> Style string for the decoration of the header above the 'ours' merge conflict diff. This styles the decoration of the header above the diff between the ancestral commit and the 'ours' branch. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the combination 'ul ol'. [default: box] --merge-conflict-ours-diff-header-style <STYLE> Style string for the header above the 'ours' branch merge conflict diff. See STYLES section. [default: normal] --merge-conflict-theirs-diff-header-decoration-style <STYLE> Style string for the decoration of the header above the 'theirs' merge conflict diff. This styles the decoration of the header above the diff between the ancestral commit and 'their' branch. See STYLES section. The style string should contain one of the special attributes 'box', 'ul' (underline), 'ol' (overline), or the combination 'ul ol'. [default: box] --merge-conflict-theirs-diff-header-style <STYLE> Style string for the header above the 'theirs' branch merge conflict diff. This styles the header above the diff between the ancestral commit and 'their' branch. See STYLES section. [default: normal] --minus-empty-line-marker-style <STYLE> Style string for removed empty line marker. Used only if --minus-style has no background color. [default: \"normal auto\"] --minus-emph-style <STYLE> Style string for emphasized sections of removed lines. See STYLES section. [default: \"normal auto\"] --minus-non-emph-style <STYLE> Style string for non-emphasized sections of removed lines that have an emphasized section. See STYLES section. [default: minus-style] --minus-style <STYLE> Style string for removed lines. See STYLES section. [default: \"normal auto\"] --navigate Activate diff navigation. Use n to jump forwards and N to jump backwards. To change the file labels used see --file-modified-label, --file-removed-label, --file-added-label, --file-renamed-label. --navigate-regex <REGEX> Regular expression defining navigation stop points --no-gitconfig Do not read any settings from git config. See GIT CONFIG section. --pager <CMD> Which pager to use. The default pager is `less`. You can also change pager by setting the environment variables DELTA_PAGER, BAT_PAGER, or PAGER (and that is their order of priority). This option overrides all environment variables above. --paging <auto|always|never> Whether to use a pager when displaying output. Options are: auto, always, and never. [default: auto] --parse-ansi Display ANSI color escape sequences in human-readable form. Example usage: git show --color=always | delta --parse-ansi This can be used to help identify input style strings to use with map-styles. --plus-emph-style <STYLE> Style string for emphasized sections of added lines. See STYLES section. [default: \"syntax auto\"] --plus-empty-line-marker-style <STYLE> Style string for added empty line marker. Used only if --plus-style has no background color. [default: \"normal auto\"] --plus-non-emph-style <STYLE> Style string for non-emphasized sections of added lines that have an emphasized section. See STYLES section. [default: plus-style] --plus-style <STYLE> Style string for added lines. See STYLES section. [default: \"syntax auto\"] --raw Do not alter the input in any way. This is mainly intended for testing delta. --relative-paths Output all file paths relative to the current directory. This means that they will resolve correctly when clicked on or used in shell commands. --right-arrow <STRING> Text to display with a changed file path. For example, a unified diff heading, a rename, or a chmod. [default: \"⟶ \"] --show-colors Show available named colors. In addition to named colors, arbitrary colors can be specified using RGB hex codes. See COLORS section. --show-config Display the active values for all Delta options. Style string options are displayed with foreground and background colors. This can be used to experiment with colors by combining this option with other options such as --minus-style, --zero-style, --plus-style, --light, --dark, etc. --show-syntax-themes Show example diff for available syntax-highlighting themes. If diff output is supplied on standard input then this will be used for the demo. For example: `git show | delta --show-syntax-themes`. --show-themes Show example diff for available delta themes. A delta theme is a delta named feature (see --features) that sets either `light` or `dark`. See https://github.com/dandavison/delta#custom-color-themes. If diff output is supplied on standard input then this will be used for the demo. For example: `git show | delta --show-themes`. By default shows dark or light themes only, according to whether delta is in dark or light mode (as set by the user or inferred from BAT_THEME). To control the themes shown, use --dark or --light, or both, on the command line together with this option. -s, --side-by-side Display diffs in side-by-side layout --syntax-theme <SYNTAX_THEME> The syntax-highlighting theme to use. Use --show-syntax-themes to demo available themes. Defaults to the value of the BAT_THEME environment variable, if that contains a valid theme name. --syntax-theme=none disables all syntax highlighting. --tabs <N> The number of spaces to replace tab characters with. Use --tabs=0 to pass tab characters through directly, but note that in that case delta will calculate line widths assuming tabs occupy one character's width on the screen: if your terminal renders tabs as more than than one character wide then delta's output will look incorrect. [default: 4] --true-color <auto|always|never> Whether to emit 24-bit (\"true color\") RGB color codes. Options are auto, always, and never. \"auto\" means that delta will emit 24-bit color codes if the environment variable COLORTERM has the value \"truecolor\" or \"24bit\". If your terminal application (the application you use to enter commands at a shell prompt) supports 24 bit colors, then it probably already sets this environment variable, in which case you don't need to do anything. [default: auto] --whitespace-error-style <STYLE> Style string for whitespace errors. Defaults to color.diff.whitespace if that is set in git config, or else 'magenta reverse'. [default: \"auto auto\"] -w, --width <N> The width of underline/overline decorations. Examples: \"72\" (exactly 72 characters), \"-2\" (auto-detected terminal width minus 2). An expression such as \"74-2\" is also valid (equivalent to 72 but may be useful if the caller has a variable holding the value \"74\"). Use --width=variable to extend decorations and background colors to the end of the text only. Otherwise background colors extend to the full terminal width. --word-diff-regex <REGEX> Regular expression defining a 'word' in within-line diff algorithm. The regular expression used to decide what a word is for the within-line highlight algorithm. For less fine-grained matching than the default try --word-diff-regex=\"\\S+\" --max-line-distance=1.0 (this is more similar to `git --word-diff`). [default: \\w+] --wrap-left-symbol <STRING> End-of-line wrapped content symbol (left-aligned). Symbol added to the end of a line indicating that the content has been wrapped onto the next line and continues left-aligned. [default: ↵] --wrap-max-lines <N> How often a line should be wrapped if it does not fit. Zero means to never wrap. Any content which does not fit will be truncated. A value of \"unlimited\" means a line will be wrapped as many times as required. [default: 2] --wrap-right-percent <PERCENT> Threshold for right-aligning wrapped content. If the length of the remaining wrapped content, as a percentage of width, is less than this quantity it will be right-aligned. Otherwise it will be left-aligned. [default: 37.0] --wrap-right-prefix-symbol <STRING> Pre-wrapped content symbol (right-aligned). Symbol displayed in front of right-aligned wrapped content. [default: …] --wrap-right-symbol <STRING> End-of-line wrapped content symbol (right-aligned). Symbol added to the end of a line indicating that the content has been wrapped onto the next line and continues right-aligned. [default: ↴] --zero-style <STYLE> Style string for unchanged lines. See STYLES section. [default: \"syntax normal\"] --24-bit-color <auto|always|never> Deprecated: use --true-color -h, --help Print help information -V, --version Print version information GIT CONFIG\n---------- By default, delta takes settings from a section named \"delta\" in git config files, if one is\npresent. The git config file to use for delta options will usually be ~/.gitconfig, but delta\nfollows the rules given in https://git-scm.com/docs/git-config#FILES. Most delta options can be\ngiven in a git config file, using the usual option names but without the initial '--'. An example\nis [delta] line-numbers = true zero-style = dim syntax FEATURES\n--------\nA feature is a named collection of delta options in git config. An example is: [delta \"my-delta-feature\"] syntax-theme = Dracula plus-style = bold syntax \"#002800\" To activate those options, you would use: delta --features my-delta-feature A feature name may not contain whitespace. You can activate multiple features: [delta] features = my-highlight-styles-colors-feature my-line-number-styles-feature If more than one feature sets the same option, the last one wins. STYLES\n------ All options that have a name like --*-style work the same way. It is very similar to how\ncolors/styles are specified in a gitconfig file:\nhttps://git-scm.com/docs/git-config#Documentation/git-config.txt-color Here is an example: --minus-style 'red bold ul \"#ffeeee\"' That means: For removed lines, set the foreground (text) color to 'red', make it bold and underlined, and set the background color to '#ffeeee'. See the COLORS section below for how to specify a color. In addition to real colors, there are 4\nspecial color names: 'auto', 'normal', 'raw', and 'syntax'. Here is an example of using special color names together with a single attribute: --minus-style 'syntax bold auto' That means: For removed lines, syntax-highlight the text, and make it bold, and do whatever delta normally does for the background.