A syntax-highlighting pager for git, diff, and grep output

Overview

image

CI Coverage Status Gitter

Get Started

Install delta and add this to your ~/.gitconfig:

[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only

[delta]
    navigate = true
    
[diff]
    colorMoved = default

A syntax-highlighting pager for git, diff, and grep output

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.

image
delta with line-numbers activated
image
delta with side-by-side and line-numbers activated

Contents

Here's what git show can look like with git configured to use delta:


image image
"Dracula" theme "GitHub" theme


All the syntax-highlighting color themes that are available with bat are available with delta:


image image
delta --show-syntax-themes --dark delta --show-syntax-themes --light

Features

  • Language syntax highlighting with color themes
  • Within-line highlights based on a Levenshtein edit inference algorithm
  • Git style strings (foreground color, background color, font attributes) are supported for >20 stylable elements
  • Side-by-side view with line-wrapping
  • Line numbering
  • Handles grep output with file paths from rg, git grep, grep, etc
  • diff-highlight and diff-so-fancy emulation modes
  • Stylable box/line decorations to draw attention to commit, file and hunk header sections.
  • Support for Git's --color-moved feature.
  • Customizable git blame with syntax highlighting (--hyperlinks formats commits as links to GitHub/GitLab/Bitbucket etc)
  • Code can be copied directly from the diff (-/+ markers are removed by default).
  • n and N keybindings to move between files in large diffs, and between diffs in log -p views (--navigate)
  • 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.
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.

Installation

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
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.
IMPORTANT: If you are using Ubuntu <= 19.10 or are mixing apt sources, read #504, be extremely cautious, and try the versions linked against musl.

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.

Configuration

Git config file

The most convenient way to configure delta is with a [delta] section in ~/.gitconfig. Here's an example:

[core]
    pager = delta

[interactive]
    diffFilter = delta --color-only --features=interactive

[delta]
    features = decorations

[delta "interactive"]
    keep-plus-minus-markers = false

[delta "decorations"]
    commit-decoration-style = blue ol
    commit-style = raw
    file-style = omit
    hunk-header-decoration-style = blue box
    hunk-header-file-style = red
    hunk-header-line-number-style = "#067a00"
    hunk-header-style = file line-number syntax

Use delta --help to see all the available options.

Note that delta style argument values in ~/.gitconfig should be in double quotes, like --minus-style="syntax #340001". For theme names and other values, do not use quotes as they will be passed on to delta, like theme = Monokai Extended.

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
  • git reflog -p
  • git add -p

To change your delta options in a one-off git command, use git -c. For example

git -c delta.line-numbers=false show

Delta can also be used as a shorthand for diffing two files: the following two commands do the same thing:

delta a.txt b.txt

git diff a.txt b.txt

Delta also handles unified diff format, e.g. diff -u a.txt b.txt | delta.

For Mercurial, you can add delta, with its command line options, to the [pager] section of .hgrc.

How delta works

If you configure delta in gitconfig as above, then git will automatically send its output to delta. Delta in turn passes its own output on to a "real" pager. Note that git will only send its output to delta if git believes that its output is going to a terminal (a "tty") for a human to read. In other words, if you do something like git diff | grep ... then you don't have to worry about delta changing the output from git, because delta will never be invoked at all. If you need to force delta to be invoked when git itself would not invoke it, then you can always pipe to delta explicitly. For example, git diff | delta | something-that-expects-delta-output-with-colors (in this example, git's output is being sent to a pipe, so git itself will not invoke delta). In general however, delta's output is intended for humans, not machines.

The pager that delta uses is determined by consulting the following environment variables (in this order):

  • DELTA_PAGER
  • PAGER

If neither is set, delta's fallback is less -R.

The behavior of delta's default pager, less, can be controlled using the LESS environment variable. It may contain any of the less command line options and/or interactive less-commands (prefixed by a leading + sign; these are executed every time right after less is launched). For full documentation of less configuration options, please see the less(1) manual.

In addition to DELTA_PAGER, and PAGER, delta currently also consults $BAT_PAGER (with priority between the two). However, this is deprecated: please use DELTA_PAGER instead. No other bat environment variables are used by delta.

Usage

Choosing colors (styles)

All options that have a name like --*-style work in the same way. It is very similar to how colors/styles are specified in a gitconfig file: https://git-scm.com/docs/git-config#Documentation/git-config.txt-color

Here's an example:

[delta]
    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.

For full details, see the STYLES section in delta --help.

Line numbers

[delta]
    line-numbers = true
image

The numbers are displayed in two columns and there are several configuration options: see the LINE NUMBERS section in delta --help for details, and see the next section for an example of configuring line numbers.

Side-by-side view

[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]

image

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.

image

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.

Grep

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.

"Features": named groups of settings

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
image

Custom themes

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 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.

diff-highlight and diff-so-fancy emulation

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:

image

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.

--color-moved support

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:

image

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:

image

Navigation keybindings for large diffs

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.

Git blame

Set delta as the pager for blame in the [pager] section of your gitconfig: see the example gitconfig. If hyperlinks is enabled then each blame commit will link to the commit on GitHub/GitLab/Bitbucket/etc.

image

24 bit color (truecolor)

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.

Using Delta with GNU Screen

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
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'  # ANSI (256-color) patterns - AB: background, AF: foreground
attrcolor 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.

Using Delta on Windows

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.

Mouse scrolling

If mouse scrolling isn't working correctly, ensure that you have the most recent version of 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.

Using Delta with Magit

Delta can be used when displaying diffs in the Magit git client: see magit-delta. Here's a screenshot:

image

Supported languages and themes

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:

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.

Comparisons with other tools

(delta --light)

delta vs. git image image
delta vs. diff-so-fancy /
diff-highlight
image image
delta vs. github image image

Build delta from source

You'll need to install the rust tools. Then:

$ cargo build --release

and use the executable found at ./target/release/delta.

Related projects

Used by delta

Using delta

Similar projects

Full --help output

delta 0.10.3
A viewer for git and diff output

USAGE:
    delta [FLAGS] [OPTIONS] [ARGS]

FLAGS:
        --light                      Use default colors appropriate for a light terminal background. For more control,
                                     see the style options and --syntax-theme
        --dark                       Use default colors appropriate for a dark terminal background. For more control,
                                     see the style options and --syntax-theme
    -n, --line-numbers               Display line numbers next to the diff. See LINE NUMBERS section
    -s, --side-by-side               Display a side-by-side diff view instead of the traditional view
        --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)
        --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
        --relative-paths             Output all file paths relative to the current directory so that they resolve
                                     correctly when clicked on or used in shell commands
        --hyperlinks                 Render commit hashes, file names, and line numbers as hyperlinks, according to 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)
        --keep-plus-minus-markers    Prefix added/removed lines with a +/- character, exactly as git does. By default,
                                     delta does not emit any prefix, so code can be copied directly from delta's output
        --show-config                Display the active values for all Delta options. Style 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
        --list-languages             List supported languages and associated file extensions
        --list-syntax-themes         List available syntax-highlighting color themes
        --show-syntax-themes         Show all available syntax-highlighting themes, each with an example of highlighted
                                     diff output. 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 available delta themes, each with an example of highlighted diff output. 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
        --show-colors                Show available named colors. In addition to named colors, arbitrary colors can be
                                     specified using RGB hex codes. See COLORS section
        --parse-ansi                 Parse ANSI color escape sequences in input and display them as git style strings.
                                     Example usage: git show --color=always | delta --parse-ansi This can be used to
                                     help identify input style strings to use with map-styles
        --no-gitconfig               Do not take any settings from git config. See GIT CONFIG section
        --raw                        Do not alter the input in any way. This is mainly intended for testing delta
        --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
        --highlight-removed          Deprecated: use --minus-style='syntax'
    -h, --help                       Prints help information
    -V, --version                    Prints version information

OPTIONS:
        --features <features>
            Name of delta features to use (space-separated). A feature is a named collection of delta options in
            ~/.gitconfig. See FEATURES section [env: DELTA_FEATURES=]  [default: ]
        --syntax-theme <syntax-theme>
            The code syntax-highlighting theme to use. Use --show-syntax-themes to demo available themes. If the syntax-
            highlighting theme is not set using this option, it will be taken from the BAT_THEME environment
            variable, if that contains a valid theme name. --syntax-theme=none disables all syntax highlighting [env:
            BAT_THEME=]
        --minus-style <minus-style>
            Style (foreground, background, attributes) for removed lines. See STYLES section [default: normal auto]
        --zero-style <zero-style>
            Style (foreground, background, attributes) for unchanged lines. See STYLES section [default: syntax normal]
        --plus-style <plus-style>
            Style (foreground, background, attributes) for added lines. See STYLES section [default: syntax auto]
        --minus-emph-style <minus-emph-style>
            Style (foreground, background, attributes) for emphasized sections of removed lines. See STYLES section
            [default: normal auto]
        --minus-non-emph-style <minus-non-emph-style>
            Style (foreground, background, attributes) for non-emphasized sections of removed lines that have an
            emphasized section. Defaults to --minus-style. See STYLES section [default: auto auto]
        --plus-emph-style <plus-emph-style>
            Style (foreground, background, attributes) for emphasized sections of added lines. See STYLES section
            [default: syntax auto]
        --plus-non-emph-style <plus-non-emph-style>
            Style (foreground, background, attributes) for non-emphasized sections of added lines that have an
            emphasized section. Defaults to --plus-style. See STYLES section [default: auto auto]
        --commit-style <commit-style>
            Style (foreground, background, attributes) 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]
        --commit-decoration-style <commit-decoration-style>
            Style (foreground, background, attributes) 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 <commit-regex>
            The regular expression used to identify the commit line when parsing git output [default: ^commit ]

        --file-style <file-style>
            Style (foreground, background, attributes) for the file section. See STYLES section. The style 'omit' can be
            used to remove the file section from the output [default: blue]
        --file-decoration-style <file-decoration-style>
            Style (foreground, background, attributes) 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]
        --hyperlinks-commit-link-format <hyperlinks-commit-link-format>
            Format string for commit hyperlinks (requires --hyperlinks). The placeholder "{commit}" will be replaced by
            the commit hash. For example: --hyperlinks-commit-link-format='https://mygitrepo/{commit}/'
        --hyperlinks-file-link-format <hyperlinks-file-link-format>
            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}]
        --hunk-header-style <hunk-header-style>
            Style (foreground, background, attributes) 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-header-file-style <hunk-header-file-style>
            Style (foreground, background, attributes) 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 <hunk-header-line-number-style>
            Style (foreground, background, attributes) 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-decoration-style <hunk-header-decoration-style>
            Style (foreground, background, attributes) 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]
        --map-styles <map-styles>
            A string specifying a mapping styles encountered in raw input to desired output styles. An example is --map-
            styles='bold purple => red "#eeeeee", bold cyan => syntax "#eeeeee"'
        --blame-format <blame-format>
            Format string for git blame commit metadata. Available placeholders are "{timestamp}", "{author}", and
            "{commit}" [default: {timestamp:<15} {author:<15.14} {commit:<8} │ ]
        --blame-palette <blame-palette>
            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-timestamp-format <blame-timestamp-format>
            Format of `git blame` timestamp in raw git output received by delta [default: %Y-%m-%d %H:%M:%S %z]

        --grep-match-line-style <grep-match-line-style>
            Style (foreground, background, attributes) for matching lines of code in grep output. See STYLES section.
            Defaults to plus-style
        --grep-match-word-style <grep-match-word-style>
            Style (foreground, background, attributes) for the specific matching substrings within a matching line of
            code in grep output. See STYLES section. Defaults to plus-style
        --grep-context-line-style <grep-context-line-style>
            Style (foreground, background, attributes) for non-matching lines of code in grep output. See STYLES
            section. Defaults to zero-style
        --grep-file-style <grep-file-style>
            Style (foreground, background, attributes) for file paths in grep output. See STYLES section. Defaults to
            hunk-header-file-path-style
        --grep-line-number-style <grep-line-number-style>
            Style (foreground, background, attributes) for line numbers in grep output. See STYLES section. Defaults to
            hunk-header-line-number-style
        --grep-separator-symbol <grep-separator-symbol>
            Symbol used in grep output to separate file path (and line number) from the line of file contents. 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: :]
        --default-language <default-language>
            Default language used for syntax highlighting when this cannot be inferred from a filename. It will
            typically make sense to set this in per-repository git config (.git/config)
        --inline-hint-style <inline-hint-style>
            Style (foreground, background, attributes) for 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]
        --word-diff-regex <tokenization-regex>
            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+]
        --max-line-distance <max-line-distance>
            The maximum distance 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]
        --line-numbers-minus-style <line-numbers-minus-style>
            Style (foreground, background, attributes) for line numbers in the old (minus) version of the file. See
            STYLES and LINE NUMBERS sections [default: auto]
        --line-numbers-zero-style <line-numbers-zero-style>
            Style (foreground, background, attributes) for line numbers in unchanged (zero) lines. See STYLES and LINE
            NUMBERS sections [default: auto]
        --line-numbers-plus-style <line-numbers-plus-style>
            Style (foreground, background, attributes) for line numbers in the new (plus) version of the file. See
            STYLES and LINE NUMBERS sections [default: auto]
        --line-numbers-left-format <line-numbers-left-format>
            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-right-format <line-numbers-right-format>
            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-left-style <line-numbers-left-style>
            Style (foreground, background, attributes) for the left column of line numbers. See STYLES and LINE NUMBERS
            sections [default: auto]
        --line-numbers-right-style <line-numbers-right-style>
            Style (foreground, background, attributes) for the right column of line numbers. See STYLES and LINE NUMBERS
            sections [default: auto]
        --wrap-max-lines <wrap-max-lines>
            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-left-symbol <wrap-left-symbol>
            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-right-symbol <wrap-right-symbol>
            Symbol added to the end of a line indicating that the content has been wrapped onto the next line and
            continues right-aligned [default: ↴]
        --wrap-right-percent <wrap-right-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 <wrap-right-prefix-symbol>
            Symbol displayed in front of right-aligned wrapped content [default: …]

        --navigate-regex <navigate-regex>
            A regexp to use in the less pager when navigating (auto-generated when unspecified)

        --file-modified-label <file-modified-label>
            Text to display in front of a modified file path [default: ]

        --file-removed-label <file-removed-label>
            Text to display in front of a removed file path [default: removed:]

        --file-added-label <file-added-label>
            Text to display in front of a added file path [default: added:]

        --file-copied-label <file-copied-label>
            Text to display in front of a copied file path [default: copied:]

        --file-renamed-label <file-renamed-label>
            Text to display in front of a renamed file path [default: renamed:]

        --right-arrow <right-arrow>
            Text to display with a changed value such as a diff heading, a rename, or a chmod [default: ⟶  ]

        --hunk-label <hunk-label>
            Text to display in front of a hunk header [default: ]

        --max-line-length <max-line-length>
            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]
        --line-fill-method <line-fill-method>
            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
    -w, --width <width>
            The width of underline/overline decorations. Examples: "72" (exactly 72 characters), 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
        --diff-stat-align-width <diff-stat-align-width>
            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]
        --tabs <tab-width>
            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 <true-color>
            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]
        --24-bit-color <24-bit-color>                                      Deprecated: use --true-color
        --inspect-raw-lines <inspect-raw-lines>
            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]
        --pager <pager>
            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 <paging-mode>
            Whether to use a pager when displaying output. Options are: auto, always, and never [default: auto]
        --minus-empty-line-marker-style <minus-empty-line-marker-style>
            Style for removed empty line marker (used only if --minus-style has no background color) [default: normal auto]
        --plus-empty-line-marker-style <plus-empty-line-marker-style>
            Style for added empty line marker (used only if --plus-style has no background color) [default: normal auto]
        --whitespace-error-style <whitespace-error-style>
            Style for whitespace errors. Defaults to color.diff.whitespace if that is set in git config, or else
            'magenta reverse' [default: auto auto]
        --line-buffer-size <line-buffer-size>
            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]
        --minus-color <deprecated-minus-background-color>
            Deprecated: use --minus-style='normal my_background_color'

        --minus-emph-color <deprecated-minus-emph-background-color>
            Deprecated: use --minus-emph-style='normal my_background_color'

        --plus-color <deprecated-plus-background-color>
            Deprecated: Use --plus-style='syntax my_background_color' to change the background color while retaining
            syntax-highlighting
        --plus-emph-color <deprecated-plus-emph-background-color>
            Deprecated: Use --plus-emph-style='syntax my_background_color' to change the background color while
            retaining syntax-highlighting
        --commit-color <deprecated-commit-color>
            Deprecated: use --commit-style='my_foreground_color' --commit-decoration-style='my_foreground_color'

        --file-color <deprecated-file-color>
            Deprecated: use --file-style='my_foreground_color' --file-decoration-style='my_foreground_color'

        --hunk-style <deprecated-hunk-style>
            Deprecated: synonym of --hunk-header-decoration-style

        --hunk-color <deprecated-hunk-color>
            Deprecated: use --hunk-header-style='my_foreground_color' --hunk-header-decoration-
            style='my_foreground_color'
        --theme <deprecated-theme>                                         Deprecated: use --syntax-theme

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

GIT CONFIG
----------

By default, delta takes settings from a section named "delta" in git config files, if one is
present. The git config file to use for delta options will usually be ~/.gitconfig, but delta
follows the rules given in https://git-scm.com/docs/git-config#FILES. Most delta options can be
given in a git config file, using the usual option names but without the initial '--'. An example
is

[delta]
    line-numbers = true
    zero-style = dim syntax

FEATURES
--------
A 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
------

All options that have a name like --*-style work the same way. It is very similar to how
colors/styles are specified in a gitconfig file:
https://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
special 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.

The available attributes are: 'blink', 'bold', 'dim', 'hidden', 'italic', 'reverse', 'strike',
and 'ul' (or 'underline').

The attribute 'omit' is supported by commit-style, file-style, and hunk-header-style, meaning to
remove the element entirely from the output.

A complete description of the style string syntax follows:

- If the input that delta is receiving already has colors, and you want delta to output those
  colors unchanged, then use the special style string 'raw'. Otherwise, delta will strip any colors
  from its input.

- A style string consists of 0, 1, or 2 colors, together with an arbitrary number of style
  attributes, all separated by spaces.

- The first color is the foreground (text) color. The second color is the background color.
  Attributes can go in any position.

- This means that in order to specify a background color you must also specify a foreground (text)
  color.

- If you want delta to choose one of the colors automatically, then use the special color 'auto'.
  This can be used for both foreground and background.

- If you want the foreground/background color to be your terminal's foreground/background color,
  then use the special color 'normal'.

- If you want the foreground text to be syntax-highlighted according to its language, then use the
  special foreground color 'syntax'. This can only be used for the foreground (text).

- The minimal style specification is the empty string ''. This means: do not apply any colors or
  styling to the element in question.

COLORS
------

There are four ways to specify a color (this section applies to foreground and background colors
within a style string):

1. CSS color name

   Any of the 140 color names used in CSS: https://www.w3schools.com/colors/colors_groups.asp

2. RGB hex code

   An example of using an RGB hex code is:
   --file-style="#0e7c0e"

3. ANSI color name

   There are 8 ANSI color names:
   black, red, green, yellow, blue, magenta, cyan, white.

   In addition, all of them have a bright form:
   brightblack, brightred, brightgreen, brightyellow, brightblue, brightmagenta, brightcyan, brightwhite.

   An example of using an ANSI color name is:
   --file-style="green"

   Unlike RGB hex codes, ANSI color names are just names: you can choose the exact color that each
   name corresponds to in the settings of your terminal application (the application you use to
   enter commands at a shell prompt). This means that if you use ANSI color names, and you change
   the color theme used by your terminal, then delta's colors will respond automatically, without
   needing to change the delta command line.

   "purple" is accepted as a synonym for "magenta". Color names and codes are case-insensitive.

4. ANSI color number

   An example of using an ANSI color number is:
   --file-style=28

   There are 256 ANSI color numbers: 0-255. The first 16 are the same as the colors described in
   the "ANSI color name" section above. See https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit.
   Specifying colors like this is useful if your terminal only supports 256 colors (i.e. doesn't
   support 24-bit color).


LINE NUMBERS
------------

To display line numbers, use --line-numbers.

Line numbers are displayed in two columns. Here's what it looks like by default:

 1  ⋮ 1  │ unchanged line
 2  ⋮    │ removed line
    ⋮ 2  │ added line

In that output, the line numbers for the old (minus) version of the file appear in the left column,
and the line numbers for the new (plus) version of the file appear in the right column. In an
unchanged (zero) line, both columns contain a line number.

The following options allow the line number display to be customized:

--line-numbers-left-format:  Change the contents of the left column
--line-numbers-right-format: Change the contents of the right column
--line-numbers-left-style:   Change the style applied to the left column
--line-numbers-right-style:  Change the style applied to the right column
--line-numbers-minus-style:  Change the style applied to line numbers in minus lines
--line-numbers-zero-style:   Change the style applied to line numbers in unchanged lines
--line-numbers-plus-style:   Change the style applied to line numbers in plus lines

Options --line-numbers-left-format and --line-numbers-right-format allow you to change the contents
of the line number columns. Their values are arbitrary format strings, which are allowed to contain
the placeholders {nm} for the line number associated with the old version of the file and {np} for
the line number associated with the new version of the file. The placeholders support a subset of
the string formatting syntax documented here: https://doc.rust-lang.org/std/fmt/#formatting-parameters.
Specifically, you can use the alignment and width syntax.

For example, the default value of --line-numbers-left-format is '{nm:^4}⋮'. This means that the
left column should display the minus line number (nm), center-aligned, padded with spaces to a
width of 4 characters, followed by a unicode dividing-line character (⋮).

Similarly, the default value of --line-numbers-right-format is '{np:^4}│'. This means that the
right column should display the plus line number (np), center-aligned, padded with spaces to a
width of 4 characters, followed by a unicode dividing-line character (│).

Use '<' for left-align, '^' for center-align, and '>' for right-align.


If something isn't working correctly, or you have a feature request, please open an issue at
https://github.com/dandavison/delta/issues.

Delta configs used in screenshots

Side-by-side view

https://github.com/vuejs/vue/commit/7ec4627902020cccd7b3f4fbc63e1b0d6b9798cd

[delta]
    features = side-by-side line-numbers decorations
    syntax-theme = Dracula
    plus-style = syntax "#003800"
    minus-style = syntax "#3f0001"

[delta "decorations"]
    commit-decoration-style = bold yellow box ul
    file-style = bold yellow ul
    file-decoration-style = none
    hunk-header-decoration-style = cyan box ul

[delta "line-numbers"]
    line-numbers-left-style = cyan
    line-numbers-right-style = cyan
    line-numbers-minus-style = 124
    line-numbers-plus-style = 28
Comments
  • 🐛 delta is much slower starting with `0.10.3` (`0.11.0` included)

    🐛 delta is much slower starting with `0.10.3` (`0.11.0` included)

    delta is much slower for me starting from 0.10.3. I was able to reproduce that without any gitconfig customizations. I will try to add a docker command to reproduce this, but wanted to open an issue in case others run into this.

    opened by infokiller 59
  • Add side-by-side line wrapping mode

    Add side-by-side line wrapping mode

    If the current line does not fit into the panel, then it is not truncated but split into multiple lines. A wrapping symbol is placed at the end of the line.

    Wrapping is limited to a certain number of lines, if this is exceeded the line is truncated by a now highlighted truncation symbol.

    Commandline argument -S / --side-by-side-wrapped.

    Also adapted --keep-plus-minus-markers logic, required to calculate the exact remaining panel width.


    Updated* Example:

    wrapped2

    In the current state is is perfectly functional, however the limit of 5 wrapped lines is currently hard coded and I have not tested the behavior with --tabs yet. Also documentation beyond the stub in --help has yet to be written, plus more tests.

    Ping #359 #299 #498

    Let me know what you think!

    opened by th1000s 44
  • Support --color-moved

    Support --color-moved

    Git recently added --color-moved support, to colour moved code: https://stackoverflow.com/a/48166435/463761

    Would it be possible to add support for that in delta?

    opened by dwijnand 38
  • Broken on macOS Catalina?

    Broken on macOS Catalina?

    Tested (installed from homebrew) with a repo with just a README.md, doesn't show almost anything for me, I guess it silently segfaults when invoked via pager, see last screenshot (same error with or without theme).

    OS: macOS Catalina w/ zsh as shell Terminal: iTerm 3.3.6 (last stable) git: 2.23.0 (last one on homebrew) rustc 1.38.0

    Normal git diff: Screenshot 2019-10-14 at 11 34 55

    Git Delta: Screenshot 2019-10-14 at 11 35 18

    Git Delta via pipe: Screenshot 2019-10-14 at 11 41 42

    opened by uraimo 38
  • 🐛 [bat warning]: Unknown theme 'Monokai Extended'

    🐛 [bat warning]: Unknown theme 'Monokai Extended'

    Thank you for delta. It was working fine for me for a long time and then recently it stopped working. Perhaps some update with bat or something on my end. Running delta on any two files now reports -

    % delta file1 file2 [bat warning]: Unknown theme 'Monokai Extended', using default. thread 'main' panicked at 'something is very wrong if the default theme is missing', /home/kellma02/.cargo/registry/src/github.com-1ecc6299db9ec823/bat-0.20.0/src/assets.rs:204:22

    % delta --version delta 0.12.2 - latest ToT built - commit a53dc02c4a81c6ff2423cb7e8f2397a20437a918

    % bat --version bat 0.20.0 (dc7d5a8) - also latest ToT built

    OS: linux 5.13.0-41 (ubuntu 20.04 + hwe)

    ok, seems like a bat problem. But bat alone for me seems ok. I cannot get bat by itself to fail like this. Should I submit this to bat ?

    % bat --theme "Monokai Extended" file1

    works ok.

    % bat --list-themes shows the theme is present -

    Theme: Monokai Extended

    A full stack trace from the delta cmdline is -

    stack backtrace: 0: 0x5614e7351b7d - std::backtrace_rs::backtrace::libunwind::trace::hee598835bc88d35b at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x5614e7351b7d - std::backtrace_rs::backtrace::trace_unsynchronized::h9cdc730ba5cf5d72 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x5614e7351b7d - std::sys_common::backtrace::_print_fmt::h75aeaf7ed30e43fa at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:66:5 3: 0x5614e7351b7d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h606862f787600875 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:45:22 4: 0x5614e737902c - core::fmt::write::he803f0f418caf762 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/fmt/mod.rs:1190:17 5: 0x5614e734cc28 - std::io::Write::write_fmt::h70bc45872f37e7bb at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/io/mod.rs:1657:15 6: 0x5614e7353ee7 - std::sys_common::backtrace::_print::h64d038cf8ac3e13e at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:48:5 7: 0x5614e7353ee7 - std::sys_common::backtrace::print::h359300b4a7fccf65 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:35:9 8: 0x5614e7353ee7 - std::panicking::default_hook::{{closure}}::hf51be35e2f510149 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:295:22 9: 0x5614e7353bb0 - std::panicking::default_hook::h03ca0f22e1d2d25e at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:314:9 10: 0x5614e7354639 - std::panicking::rust_panic_with_hook::h3b7380e99b825b63 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:698:17 11: 0x5614e7354327 - std::panicking::begin_panic_handler::{{closure}}::h8e849d0710154ce0 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:588:13 12: 0x5614e7352044 - std::sys_common::backtrace::__rust_end_short_backtrace::hedcdaddbd4c46cc5 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/sys_common/backtrace.rs:138:18 13: 0x5614e7354039 - rust_begin_unwind at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5 14: 0x5614e7092cf3 - core::panicking::panic_fmt::he1bbc7336d49a357 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14 15: 0x5614e7377ad1 - core::panicking::panic_display::hb184394d54dc8360 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:73:5 16: 0x5614e7377a7b - core::panicking::panic_str::ha42887cd972750c9 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:56:5 17: 0x5614e7092b66 - core::option::expect_failed::h9159c9d16ed9fb7c at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/option.rs:1852:5 18: 0x5614e7203cce - bat::assets::HighlightingAssets::get_theme::hc7467125c4edc0ea 19: 0x5614e70dc4a8 - delta::options::theme::set__is_light_mode__syntax_theme__syntax_set::h677759c10e43ad69 20: 0x5614e715b390 - delta::options::set::set_options::h8d58af2bf0c84dcf 21: 0x5614e7095c1f - delta::cli::Opt::from_clap_and_git_config::h61c2a01edb15a7ff 22: 0x5614e709599f - delta::cli::Opt::from_args_and_git_config::hdbf699dc115ec9e4 23: 0x5614e7175084 - delta::main::hf4df0a35130e1bc7 24: 0x5614e71291c3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h62d7051c2c241ccc 25: 0x5614e717791d - std::rt::lang_start::{{closure}}::hcdf5d85a768ff03e 26: 0x5614e7351261 - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::hb7014f43484a8b4e at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:259:13 27: 0x5614e7351261 - std::panicking::try::do_call::h7bc9dc436daeb8c7 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40 28: 0x5614e7351261 - std::panicking::try::h653d68a27ff5f175 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19 29: 0x5614e7351261 - std::panic::catch_unwind::h9d739f9f59895e68 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14 30: 0x5614e7351261 - std::rt::lang_start_internal::{{closure}}::hf006f2bc7ce22bbe at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:48 31: 0x5614e7351261 - std::panicking::try::do_call::hfb39d6df61a2e69f at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:492:40 32: 0x5614e7351261 - std::panicking::try::h13e2d225134958ac at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:456:19 33: 0x5614e7351261 - std::panic::catch_unwind::h3bd49b5a5dfb1a50 at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panic.rs:137:14 34: 0x5614e7351261 - std::rt::lang_start_internal::h2ba92edce36c035e at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/rt.rs:128:20 35: 0x5614e71787c2 - main 36: 0x14d5f048b0b3 - __libc_start_main at /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16 37: 0x5614e709352e - _start

    Is there anything else I can provide ?

    thx, -m

    opened by mckellygit 32
  • 🚀RFC: New color/style options, diff-so-fancy/diff-highlight emulation

    🚀RFC: New color/style options, diff-so-fancy/diff-highlight emulation

    @0xC0FFEE @Amorymeltzer @CSRaghunandan @Kr1ss-XD @bluz71 @boris-petrov @clnoll @da-x @elbaro @gibfahn @gpressutto5 @jc00ke @lightspeedbriefs @mk12 @natsumi @waldyrious @JNRowe

    Hi everyone,

    TL;DR: If you are able to run the new delta in master by building from source, that would be really useful and much appreciated. Your current config should just work as before without you changing anything: please let me know if it doesn't.

    git pull origin master
    cargo build --release
    ./target/release/delta --help
    

    Thanks very much for your help with delta. I'm opening this issue to describe the new options for configuring colors and styles in the unreleased version of delta in master. To keep the discussion in one place, I've tagged people here who have been helping with delta development and are involved in the various issues related to this topic: any feedback/bug reports/complaints etc you're able to give would be much appreciated. I hope this is OK, let me know if not and please use the Unsubscribe button on the right-hand side of the issues UI to stop notifications from this issue. The notes below will become the release notes for the next release.

    Although it seems like a lot of changes, no command-line options have been removed: master should be 100% backwards-compatible.


    The master branch has added new options for configuring foreground and background colors, and box/line etc decorations. Every stylable element foo now has two options: --foo-style and --foo-decoration-style. Both accept a "style string". An example of a style string is 'ul bold red "#420000"' meaning "bold, red, underlined foreground (text) color with background color #420000".

    So it's basically the same style/color mini-language as is used by gitconfig (and thus by diff-highlight & diff-so-fancy). There are some delta-specific extensions: for example, you use the special color name 'syntax' as a foreground color to request syntax highlighting.

    This allows lots of things that weren't possible before: e.g. non-syntax highlighting text colors for code, background colors for unchanged code lines, background color for commit/file/hunk-header lines, and the ability to apply any subset of the 8 available style attributes to text: blink, bold, dim, hidden, italic, reverse, strike, ul (or underline).

    Here's an example showing how to use a light theme with a dark terminal background (#153). (This is possible because we can now override the terminal's background colors in more places.)

    delta --theme=OneHalfLight
          --minus-style 'syntax auto' --minus-emph-style='syntax auto'
          --zero-style 'syntax white'
          --plus-style 'syntax auto' --plus-emph-style 'syntax auto'
          --hunk-header-style='syntax white' --hunk-header-decoration-style='black box'
    
    image

    And here's diff-so-fancy / diff-highlight emulation:1 (#177, #169, #193):

    delta --minus-style 'red bold' --minus-emph-style 'red bold 52'
          --zero-style 'normal'
          --plus-style 'green bold' --plus-emph-style 'green bold 22'
          --hunk-header-style 'bold syntax' --hunk-header-decoration-style 'bold magenta box'
          --file-style 'bold yellow' --file-decoration-style 'bold yellow underoverline'
          --commit-style 'bold yellow'
    
                                         delta                                                                           diff-so-fancy
    image
                                         delta                                                                           diff-so-fancy
    image

    Here's the relevant section of delta --help:

    image

    The old options such as --minus-color (meaning the background color) are all still available, and everything is intended to be backwards compatible, but delta --help describes the old options as deprecated. Here's a summary of what's changed: | | Previously | Now | |------------------------------------------------------------|-----------------------------|---------------------------------------------------------------------------------------------| | --minus-color, etc | background color | deprecated: use --foo-style instead | | --zero-style | - | New option: "zero" means unchanged lines | | --file-color,
    --commit-color | foreground color | deprecated: use --foo-style instead | | --hunk-color | decoration foreground color | deprecated: use --hunk-header-style instead | | --hunk-style | {box,underline} decoration | deprecated: synonym of --hunk-header-decoration-style | | --file-style,
    --commit-style | {box,underline} decoration | These now apply to the text.
    Use --foo-decoration-style for the decoration. |

    There's one slightly subtle technicality: --file-style, and --commit-style now configure the text, whereas previously they configured the decoration surrounding the text. But, users' current configs will be using "box" and "underline" in this context to configure the decoration. So, for backwards compatibility, "box" and "underline" (or "ul") are allowed to occur here and are applied to the decoration if they are encountered.

    The changes described here close the following issues:

    • #177 (request for foreground colors enabling behavior like diff-so-fancy / diff-highlight)
    • #169 (request for different styling of lines with and without emph, like diff-highlight/diff-so-fancy)
    • #193 (request for reverse/negative highlighting like diff-highlight)
    • #87, #153 (requests for ability to override terminal's background color)

    Related to but does not close yet:

    • #97 (request to retain traditional hunk header within box)
    • #168 (work by @da-x on additional stylable elements; when to allow raw git input with colors through unchanged)

    Remaining questions / work needed:

    • Should future delta offer custom format strings for styling different elements?
    • When does delta pass on raw colors in the input? (#168)
    • Should delta take configuration from gitconfig?
    • Better defaults for delta's within-line highlights (#140)
    • Need to right-fill with background colors in more places?

    To build delta from source:

    You'll need to install the rust tools.

    git pull origin master
    cargo build --release
    ./target/release/delta --help
    

    1 The styles are from the example in the diff-so-fancy README.

    opened by dandavison 27
  • 🐛 no output from git diff

    🐛 no output from git diff

    hello! thanks for making this. i look forward to using it more.

    i installed this via brew install git-delta, and i've added these lines to my ~/.gitconfig.

    [core]
    	pager = delta
    
    [delta]
    	plus-color = "#012800"
    	minus-color = "#340001"
    	syntax-theme = Monokai Extended
    	side-by-side = false
    	line-numbers = true
    
    [interactive]
    	diffFilter = delta --color-only
    

    mouse scrolling didn't work, so i added export BAT_PAGER="less -RF" to my .profile as mentioned in the readme.

    for the most part, things look great. git show looks great.

    i made some quick file changes to try git diff. i can walk through the changes with git add -p, but git diff produces no output at all!

    $ git diff
    $ echo $?
    0
    

    i'm on macos 10.15.7 using Terminal, and i have oh my zsh installed. i can provide other details, but i'm unsure how to dig into this!

    opened by brandly 25
  • Skip specified settings in .gitconfig

    Skip specified settings in .gitconfig

    Fix https://github.com/dandavison/delta/issues/307.

    Bool option couldn't be disabled by command. There was three options to solve this,

    1. Make all bool options into string <- kind of messy.
    2. Make --no-** flag <- kind of messy. Need to add each no-flags. Even if https://github.com/TeXitoi/structopt/issues/320 will be able to do, still need to handle in set_option.
    3. [This PR] Change --no-gitconfig option to Vec, and it will ignore those specified keys. <- This one option can disable as much options as you want. Also, you can skip some non-bool config at same time. It will be useful.

    I'm still not sure if this way is the best, so I titled 'suggestion'. I would like to hear any ideas.

    ss 1 ss
    opened by ulwlu 22
  • UTF-8 problems on Windows

    UTF-8 problems on Windows

    I'm finding that either delta or my terminal emulator is having a hard time with the non-ascii characters used for decorations. Long lines also don't quite behave ideally. While I think delta is somehow the problem here, I'm not really sure, but I figured it would be good to at least file an issue in case anyone else encounters a similar problem. Even if I'm wrong, if someone could point me in the right direction, I'd appreciate it.

    Assorted pertinent information:
    • Running in the latest version of MSYS2 mintty on Windows 8.1
    • I am using the version of less that comes with MSYS2; unsure if that is the same as what git-for-windows ships with.
    • I installed both delta and bat via cargo, and neither are aliased.
    • My bat config file contains only custom --map-syntax flags

    image image

    Regardless of the value of core.pager: image

    Raw git diff for an arbitrary git-managed file: image (for now, only the first few lines of it, because that's really all I expect will be needed and the whole thing is just over 200 lines)


    Without any value set for core.pager: image

    Side note regarding the width

    I know that the issue with the width can be handled with git diff .inputrc | delta -ns --width="$(tput cols)", but that still doesn't provide any means of displaying parts of a line that continue off screen. image image The complete text of line 49 reads # If enabled, lists all matches in case multiple possible completions are possible.. Please just disregard how odd "possible completions are possible" sounds.


    After git config --global core.pager=delta, the first few lines of git diff .inputrc are shown as: image and just for good measure, after adding to my global gitconfig

    [delta]
    	features = side-by-side line-numbers
    	syntax-theme = Monokai Extended
    [delta "line-numbers"]
    	line-numbers = true
    [interactive]
    	diffFilter = delta --color-only
    

    It only gets worse image and either way, there's still that little detail regarding the parts of the line that aren't initially shown. Oh yeah, as I was getting screenshots and writing out this issue report, I discovered that trying to pipe either git diff .inputrc | delta or git diff .inputrc(with the previously mentioned gitconfig settings applied) through programs like head or tail only seems to pass along the default git diff output; not sure if that's supposed to happen.

    opened by StaticPH 22
  • Windows support

    Windows support

    Is Windows support planned?

    delta builds successfully if you remove the dependency on termios from Cargo.toml.

    Trying it out though it seems there are a couple issues demonstrated in the screenshot below (which is captured from my 1 line change to get delta to build):

    image

    Note first line in the box around the context is off by 1.

    But more worrisome - the actual diff in Cargo.toml isn't highlighted at all like the default pager would:

    image

    help wanted 
    opened by lzybkr 20
  • 🚀 Support for Apple Silicon/ARM64

    🚀 Support for Apple Silicon/ARM64

    Is there any plan to support Apple Silicon/ARM64?

    Thanks

    Building with Cargo 1.48.0 I get:

    warning: error: unknown target triple 'unknown-apple-macosx11.0.0', please use -triple or -arch

    opened by johnalanwoods 19
  • Bump sysinfo from 0.24.5 to 0.27.2

    Bump sysinfo from 0.24.5 to 0.27.2

    Bumps sysinfo from 0.24.5 to 0.27.2.

    Changelog

    Sourced from sysinfo's changelog.

    0.27.2

    • Linux: Fix consecutive process CPU usage updates.
    • Linux: Ignore NFS disks.

    0.27.1

    • Unix systems: Fix network address segfault issue.

    0.27.0

    • Add NetworkExt::mac_address method and MacAddr type.
    • Linux: Fix truncated environment retrieval.
    • Implement TryFrom<usize> and FromStr for Gid and Uid.
    • Implement TryFrom<usize> for Pid.
    • Fix documentation of System::new about CPU list not loaded by default.

    0.26.8

    • Add ProcessExt::session_id method.
    • Linux: Ignore NFS disks.

    0.26.7

    • Apple: Greatly improve disk retrieval (I recommend reading the pull request first comment for more information here: GuillaumeGomez/sysinfo#855).
    • Remove build script.

    0.26.6

    • Add Process::wait.
    • Add "Good pratice" entry into the crate level documentation and in the README.
    • Linux: More precise used memory computation.

    0.26.5

    • Windows: Fix disk information retrieval.
    • Linux: Improve Process document.
    • Linux: Fix a compilation error if the apple-sandbox feature is enabled.
    • Internal code improvements.

    0.26.4

    • Add SystemExt::distribution_id method.
    • Update ntapi version to 0.4.
    • Update minimum supported Rust version (MSRV) to 1.59 for ntapi 0.4.

    0.26.3

    • Update minimum supported Rust version (MSRV) to 1.56 to follow once_cell minor update.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump console from 0.15.0 to 0.15.3

    Bump console from 0.15.0 to 0.15.3

    Bumps console from 0.15.0 to 0.15.3.

    Changelog

    Sourced from console's changelog.

    0.15.3

    Enhancements

    • Dropped terminal_size dependency.

    0.15.2

    Enhancements

    • Dropped once_cell dependency to support MSRV again.

    0.15.1

    Enhancements

    • ANSI support no longer depends on regex crate.
    • Crate now supports minver.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump serde from 1.0.138 to 1.0.152

    Bump serde from 1.0.138 to 1.0.152

    Bumps serde from 1.0.138 to 1.0.152.

    Release notes

    Sourced from serde's releases.

    v1.0.152

    • Documentation improvements

    v1.0.151

    • Update serde::{ser,de}::StdError to re-export core::error::Error when serde is built with feature="std" off and feature="unstable" on (#2344)

    v1.0.150

    • Relax some trait bounds from the Serialize impl of HashMap and BTreeMap (#2334)
    • Enable Serialize and Deserialize impls of std::sync::atomic types on more platforms (#2337, thanks @​badboy)

    v1.0.149

    • Relax some trait bounds from the Serialize impl of BinaryHeap, BTreeSet, and HashSet (#2333, thanks @​jonasbb)

    v1.0.148

    • Support remote derive for generic types that have private fields (#2327)

    v1.0.147

    • Add serde::de::value::EnumAccessDeserializer which transforms an EnumAccess into a Deserializer (#2305)

    v1.0.146

    • Allow internally tagged newtype variant to contain unit (#2303, thanks @​tage64)

    v1.0.145

    • Allow RefCell<T>, Mutex<T>, and RwLock<T> to be serialized regardless of whether T is Sized (#2282, thanks @​ChayimFriedman2)

    v1.0.144

    • Change atomic ordering used by Serialize impl of atomic types to match ordering used by Debug impl of those same types (#2263, thanks @​taiki-e)

    v1.0.143

    • Invert build.rs cfgs in serde_test to produce the most modern configuration in the default case (#2253, thanks @​taiki-e)

    v1.0.142

    • Add keywords to crates.io metadata

    v1.0.141

    • Add no-std category to crates.io metadata

    v1.0.140

    • Invert serde_derive cfgs to convenience non-Cargo builds on a modern toolchain (#2251, thanks @​taiki-e)

    v1.0.139

    • Add new constructor function for all IntoDeserializer impls (#2246)
    Commits
    • ccf9c6f Release 1.0.152
    • b25d0ea Link to Hjson data format
    • 4f4557f Link to bencode data format
    • bf400d6 Link to serde_tokenstream data format
    • 4d2e36d Wrap flexbuffers bullet point to 80 columns
    • df6310e Merge pull request #2347 from dtolnay/docsrs
    • 938ab5d Replace docs.serde.rs links with intra-rustdoc links
    • ef5a0de Point documentation links to docs.rs instead of docs.serde.rs
    • 5d186c7 Opt out -Zrustdoc-scrape-examples on docs.rs
    • 44bf363 Release 1.0.151
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump serde_json from 1.0.82 to 1.0.91

    Bump serde_json from 1.0.82 to 1.0.91

    Bumps serde_json from 1.0.82 to 1.0.91.

    Release notes

    Sourced from serde_json's releases.

    v1.0.90

    • Documentation improvements

    v1.0.89

    • Fix invalid JSON incorrectly accepted when a large number has no digits after decimal point (#953)

    v1.0.88

    • Optimize serde_json::Map's implementation of append and clone_from (#952, thanks @​Lucretiel)

    v1.0.87

    • Add write_i128 and write_u128 methods to serde_json::Formatter to control the formatting of 128-bit integers (#940, thanks @​Lucretiel)

    v1.0.86

    • Support arbitrary_precision feature even in no-std mode (#928, thanks @​kvinwang)

    v1.0.85

    • Make Display for Number produce the same representation as serializing (#919)

    v1.0.84

    • Make Debug impl of serde_json::Value more compact (#918)

    v1.0.83

    • Add categories to crates.io metadata
    Commits
    • 26f147f Release 1.0.91
    • d9cdb98 Opt out -Zrustdoc-scrape-examples on docs.rs
    • 331511d Release 1.0.90
    • 8753829 Replace ancient CI service provider in readme
    • 0a43394 Update build status badge
    • 8794844 Prevent build.rs rerunning unnecessarily on all source changes
    • 0b54871 Time out workflows after 45 minutes
    • ecad462 Fix renamed let_underscore_drop lint
    • 9295c96 Resolve needless_borrowed_reference clippy lints
    • d2f9368 Release 1.0.89
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • 🐛

    🐛 "navigate" makes less history transient

    #237 changed delta to duplicate less’ history file before handing over. I find this surprising as it means one cannot recall searches from even previous delta invocations.

    For example:

    1. Run git log through delta, search for specific commits with /^author: adam.
    2. Don't find intended commits, quit.
    3. Switch to the right branch.
    4. Run git log agani, type / then up-arrow to find past search - but it's not there.
    5. Have to type out /^author: adam accurately again.

    I propose the implementation changes in one of two ways:

    1. Edit the user's default history file in-place to add the navigate search regex (or move to bottom). I didn’t spot the reason this option wasn’t taken previously. Editing the less history file just a bit doesn’t seem as bad as duplicating it.
    2. Duplicate the user’s less history file to ~/.local/share/delta/lesshst only if there isn’t a duplicate already. Otherwise, only edit the duplicate file, to append/move the navigate search string at/to the end.

    Either option would make delta lesses share history. The first would share with other lesses, which is “less” of a win imo.

    opened by adamchainz 1
  • Recommend zdiff3 merge.conflictStyle

    Recommend zdiff3 merge.conflictStyle

    Compared to diff3, zdiff3 minimizes the conflicted region, so fewer lines will show as conflicted. This normally makes merge conflicts easier to resolve. Docs: https://git-scm.com/docs/git-config#Documentation/git-config.txt-mergeconflictStyle .

    I also made conflictStyle follow Git’s casing, as other options are documented like that as well.

    opened by adamchainz 0
Releases(0.15.1)
Owner
Dan Davison
Dan Davison
Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

eva simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history installation Homebrew $ brew install eva crates.io $ car

Akshay 632 Jan 4, 2023
A standalone code editor with syntax highlighting and themes.

CodeEditor A standalone code (and text) editor for people like me who write their own user interfaces utilizing crates like pixels. CodeEditor renders

Markus Moenig 8 Nov 25, 2022
🌴 Syntax highlighting in Rust.

?? HL (WIP) Syntax highlighting written in Rust. The project is designed to generate html syntax highlighting for the given file. This software is ins

ahmadrosid 8 Jun 28, 2022
Watch output and trigger on diff!

watchdiff Watch output and trigger on diff! Ever want to have watch output only tell you what changed? And not only what, but when? Now you can! Enter

geno 2 Apr 6, 2022
Grep with human-friendly search output

hgrep: Human-friendly GREP hgrep is a grep tool to search files with given pattern and print the matched code snippets with human-friendly syntax high

Linda_pp 345 Jan 4, 2023
Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. A tokei/scc/cloc alternative.

tcount (pronounced "tee-count") Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. Quick Start Simply run tcount

Adam P. Regasz-Rethy 48 Dec 7, 2022
A diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to retain every change.

Docchi is a diff-based data management language to implement unlimited undo, auto-save for games, and cloud-apps which needs to save very often. User'

juzy 21 Sep 19, 2022
Rust library crate providing utility functions for diff and patch of slices

This crate provides the Change enum as an abstraction for diff::Result, lcs_diff::DiffResult, and wu_diff::DiffResult; the diff_changes(), diff_diff()

qtfkwk 5 Oct 19, 2022
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Orhun Parmaksız 5k Jan 9, 2023
A git sub-command to view your git repository in the web browser

git-view A git sub-command to view your git repository in the web browser! About Are you also frustrated from moving your hands away from the keyboard

Hamothy 5 Sep 26, 2022
Git Explorer: cross-platform git workflow improvement tool inspired by Magit

Gex Git workflow improvement CLI tool inspired by Magit. This project is still under initial development, but I am actively dogfooding it and features

Peter Hebden 204 Jan 6, 2023
Like grep, but uses tree-sitter grammars to search

tree-grepper Works like grep, but uses tree-sitter to search for structure instead of strings. Installing This isn't available packaged anywhere. That

Brian Hicks 219 Dec 25, 2022
Baby's first Rust CLI project. Basic implementation of grep. Written in about 100 SLOC.

minigrep Coding project from Chapter 12 of the The Rust Programming Language book. Usage Compile and run as so minigrep QUERY FILENAME QUERY being the

Anis 2 Oct 2, 2021
A simplified recreation of the command-line utility grep written in Rust.

smolgrep A simplified recreation of the command-line utility grep written in Rust. Download and run Download Rust On Mac/Linux Open a terminal and ent

Thi Dinh 0 Dec 27, 2021
Fgr - Find & Grep utility with SQL-like query language

fgr Find & Grep utility with SQL-like query language. Examples # Find all files with name equal to sample under the current directory: fgr -e name=sam

Igor 3 Dec 22, 2022
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Lukas Kalbertodt 75 Jul 28, 2022
CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a plotable format.

Lighthouse Aggregator CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" f

Polestar 1 Jan 12, 2022
A collection of tools for i3 that assist in window, workspace and output operations.

i3-valet A collection of tools for i3 that assist in window, workspace and output operations. i3-valet can be run directly from the command line or as

Erich Heine 15 Jan 8, 2023