### Install delta on Debian/Ubuntu from .deb Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Install delta on Debian/Ubuntu by downloading and installing a .deb file. ```bash dpkg -i file.deb ``` -------------------------------- ### Install git-delta on openSUSE Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use zypper to install the git-delta package on openSUSE. ```bash zypper install git-delta ``` -------------------------------- ### Install delta on Nix Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use nix-env to install the delta package on Nix. ```bash nix-env -iA nixpkgs.delta ``` -------------------------------- ### Install git-delta on Gentoo Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use emerge to install the git-delta package on Gentoo. ```bash emerge dev-util/git-delta ``` -------------------------------- ### Install delta on Windows with Winget Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use winget to install the delta package on Windows. ```bash winget install dandavison.delta ``` -------------------------------- ### Install git-delta with Cargo Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Install git-delta using the Cargo package manager. ```bash cargo install git-delta ``` -------------------------------- ### Install git-delta on FreeBSD Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use pkg to install the git-delta package on FreeBSD. ```bash pkg install git-delta ``` -------------------------------- ### Install delta on Windows with Chocolatey Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use choco to install the delta package on Windows. ```bash choco install delta ``` -------------------------------- ### Install delta on OpenBSD Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use pkg_add to install the delta package on OpenBSD. ```bash pkg_add delta ``` -------------------------------- ### Install delta on Void Linux Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use xbps-install to install the delta package on Void Linux. ```bash xbps-install -S delta ``` -------------------------------- ### Install git-delta on MacPorts Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use port to install the git-delta package on macOS. ```bash port install git-delta ``` -------------------------------- ### Install git-delta on Fedora Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use dnf to install the git-delta package on Fedora. ```bash dnf install git-delta ``` -------------------------------- ### Install delta on Windows with Scoop Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use scoop to install the delta package on Windows. ```bash scoop install delta ``` -------------------------------- ### Install git-delta on Homebrew Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use brew to install the git-delta package on macOS. ```bash brew install git-delta ``` -------------------------------- ### Install git-delta on Arch Linux Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Use pacman to install the git-delta package on Arch Linux. ```bash pacman -S git-delta ``` -------------------------------- ### List Supported Syntax Themes Source: https://github.com/dandavison/delta/blob/main/manual/src/supported-languages-and-themes.md Use this command to see all color themes Delta can apply. This relies on the underlying 'bat' installation. ```bash delta --list-syntax-themes ``` -------------------------------- ### Install git-delta with conda/mamba Source: https://github.com/dandavison/delta/blob/main/manual/src/installation.md Install git-delta using conda or mamba from the conda-forge channel. ```bash conda install git-delta -c conda-forge ``` ```bash mamba install git-delta -c conda-forge ``` -------------------------------- ### List Supported Languages Source: https://github.com/dandavison/delta/blob/main/manual/src/supported-languages-and-themes.md Use this command to see all languages Delta can syntax highlight. This relies on the underlying 'bat' installation. ```bash delta --list-languages ``` -------------------------------- ### Install Development Version with Homebrew Source: https://github.com/dandavison/delta/blob/main/manual/src/build-delta-from-source.md Install the latest development version of Delta, including unreleased changes, using Homebrew. This is an alternative to building from source with Cargo. ```sh brew install --HEAD git-delta ``` -------------------------------- ### Show Available Syntax Themes Source: https://github.com/dandavison/delta/blob/main/README.md Use the '--show-syntax-themes' option with '--dark' or '--light' flags to preview the available syntax highlighting themes for Delta. This requires Delta to be installed and configured. ```bash delta --show-syntax-themes --dark ``` ```bash delta --show-syntax-themes --light ``` -------------------------------- ### HTTP Server for Opening Files Source: https://github.com/dandavison/delta/blob/main/manual/src/hyperlinks.md Use a local HTTP server to open files in your editor. Configure Delta to send requests to this server. The provided Python code is a starting point for such a server. ```gitconfig [delta] hyperlinks = true hyperlinks-file-link-format = "http://localhost:8000/open-in-editor?path={path}&line={line}" ``` ```python from http.server import BaseHTTPRequestHandler, HTTPServer from pathlib import Path from subprocess import call from urllib.parse import parse_qs, urlparse class OpenInEditor(BaseHTTPRequestHandler): def do_GET(self): if self.path.startswith("/open-in-editor"): query = parse_qs(urlparse(self.path).query) [path], [line] = query["path"], query["line"] # TODO: You might need to change this to construct the correct root directory for the # project that the file is in, so that your IDE opens in the project workspace. cwd = Path(path).parent # TODO: Replace with the appropriate command for your editor call(["code", "-g", f"{path}:{line}"], cwd=cwd) self.send_response(200) else: self.send_response(404) self.end_headers() print("Starting open-in-editor server on port 8000...") HTTPServer(("", 8000), OpenInEditor).serve_forever() ``` -------------------------------- ### Configure File Link Format for Editors Source: https://github.com/dandavison/delta/blob/main/manual/src/hyperlinks.md Set the `hyperlinks-file-link-format` to construct URLs that open specific editors. Examples for VSCode and JetBrains IDEs are provided. ```gitconfig [delta] hyperlinks = true hyperlinks-file-link-format = "vscode://file/{path}:{line}" ``` ```gitconfig # hyperlinks-file-link-format = "idea://open?file={path}&line={line}" ``` ```gitconfig # hyperlinks-file-link-format = "pycharm://open?file={path}&line={line}" ``` -------------------------------- ### Configure Git with Delta Source: https://github.com/dandavison/delta/blob/main/manual/src/get-started.md Add these configurations to your `~/.gitconfig` file to enable Delta for Git diffs and interactive staging. This setup includes options for navigation and color themes. ```gitconfig [core] pager = delta [interactive] diffFilter = delta --color-only [delta] navigate = true # use n and N to move between diff sections dark = true # or `light = true`, or omit for auto-detection [merge] conflictStyle = zdiff3 ``` -------------------------------- ### Configure a Custom Theme Feature Source: https://github.com/dandavison/delta/blob/main/manual/src/custom-themes.md After including themes, specify your chosen theme as a feature in your Delta configuration. This example uses 'collared-trogon' as the theme. ```gitconfig [delta] features = collared-trogon side-by-side = true ... ``` -------------------------------- ### Delta Configuration in Git Config Source: https://github.com/dandavison/delta/blob/main/manual/src/configuration.md Example of Delta configuration options within the ~/.gitconfig file. Use this to set Delta as the pager and configure its appearance and navigation. ```gitconfig [core] pager = delta [interactive] diffFilter = delta --color-only [delta] navigate = true # use n and N to move between diff sections dark = true # or light = true, or omit for auto-detection [merge] conflictStyle = zdiff3 ``` -------------------------------- ### Delta Configuration for Side-by-Side View Source: https://github.com/dandavison/delta/blob/main/manual/src/delta-configs-used-in-screenshots.md Configure Delta to display diffs side-by-side with line numbers, syntax highlighting, and custom styles for added/removed lines and decorations. This setup is ideal for visually enhanced code reviews. ```gitconfig [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 ``` -------------------------------- ### Show Syntax Theme Demo Source: https://github.com/dandavison/delta/blob/main/manual/src/supported-languages-and-themes.md View a demonstration of all available color themes. This helps in choosing a theme for your Delta configuration. ```bash delta --show-syntax-themes ``` -------------------------------- ### Build Delta Project Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Clone the repository, navigate to the project directory, and build the release version of the Delta executable. ```shell git clone https://github.com/dandavison/delta/ cd delta cargo build --release ``` -------------------------------- ### Format Code Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Apply the project's standard code formatting to all files. ```shell cargo fmt ``` -------------------------------- ### Run All Tests Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Execute all tests in the Delta project using the provided make command. ```shell make test ``` -------------------------------- ### Customize Removed Line Style Source: https://github.com/dandavison/delta/blob/main/manual/src/choosing-colors-styles.md Define custom styles for removed lines using `minus-style` in gitconfig. This example sets the foreground to red, makes the text bold and underlined, and applies a light pink background. ```gitconfig [delta] minus-style = red bold ul "#ffeeee" ``` -------------------------------- ### Build Delta with Cargo Source: https://github.com/dandavison/delta/blob/main/manual/src/build-delta-from-source.md Compile the Delta tool from source using Cargo. The executable will be available at `./target/release/delta`. ```sh cargo build --release ``` -------------------------------- ### Export Delta Output to HTML Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/export-to-html.md This snippet demonstrates piping the output of `git show` through Delta for syntax highlighting and then through `ansifilter` to convert it to HTML. The output is redirected to a temporary HTML file. ```shell git show \ | delta --no-gitconfig --file-decoration-style blue --hunk-header-decoration-style blue \ | ansifilter --html \ > /tmp/diff.html ``` -------------------------------- ### Customize Line Numbers in Side-by-Side View Source: https://github.com/dandavison/delta/blob/main/manual/src/side-by-side-view.md Disable line numbers in side-by-side view while retaining a vertical delimiter. This configuration example sets empty formats for left and right line numbers, with a pipe symbol for the right panel. ```gitconfig [delta " side-by-side = true line-numbers-left-format = "" line-numbers-right-format = "│ " ``` -------------------------------- ### Configure Git with Command-Line Git Config Source: https://github.com/dandavison/delta/blob/main/README.md Use these git config commands to achieve the same integration as the ~/.gitconfig file. This is useful for scripting or applying settings individually. ```sh git config --global core.pager delta git config --global interactive.diffFilter 'delta --color-only' git config --global delta.navigate true git config --global delta.dark true # or `delta.light true`, or omit for auto-detection git config --global merge.conflictStyle zdiff3 ``` -------------------------------- ### Configure Screen for 256-Color Output Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/using-delta-with-gnu-screen.md Include these settings in your screenrc file to ensure proper 256-color display in Screen, especially when true color is not available. ```Shell 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 ``` -------------------------------- ### Check Code Formatting Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Verify that the code adheres to the project's formatting standards without making changes. ```shell cargo fmt -- --check ``` -------------------------------- ### Enable Features via Environment Variable Source: https://github.com/dandavison/delta/blob/main/manual/src/features-named-groups-of-settings.md Use the `DELTA_FEATURES` environment variable to enable features from the command line. Prepending `+` adds features to existing configurations. ```sh export DELTA_FEATURES=+side-by-side ``` ```sh export DELTA_FEATURES=+ ``` -------------------------------- ### Generate Shell Completion Script Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/shell-completion.md Use the `--generate-completion` subcommand followed by the shell name to print the completion script to standard output. Replace `` with 'bash', 'elvish', 'fish', 'powershell', or 'zsh'. ```sh delta --generate-completion ``` -------------------------------- ### Configure tmux for 24-bit color Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/using-delta-with-tmux.md Add this line to your `~/.tmux.conf` file to enable 24-bit color support in tmux. You may need to restart tmux for the changes to take effect. ```Shell set -ga terminal-overrides ",*-256color:Tc" ``` -------------------------------- ### Configure Delta for VSCode Hyperlinks Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/using-delta-with-vscode.md Add this configuration to your `.gitconfig` file to enable Delta's hyperlink feature and specify the format for file links that open in VSCode. ```gitconfig [delta "delta"] hyperlinks = true hyperlinks-file-link-format = "vscode://file/{path}:{line}" ``` -------------------------------- ### Setting a Custom Git Config Path Source: https://github.com/dandavison/delta/blob/main/manual/src/configuration.md Environment variable to specify an alternative location for the Git configuration file, useful for managing Delta's config separately. ```bash export GIT_CONFIG_GLOBAL=/path/to/my/delta/config ``` -------------------------------- ### Configure Git to Use Delta as Pager Source: https://github.com/dandavison/delta/blob/main/README.md Add these settings to your ~/.gitconfig file to enable Delta for diffs and interactive filtering. Delta can auto-detect light/dark themes or be explicitly set. ```gitconfig [core] pager = delta [interactive] diffFilter = delta --color-only [delta] navigate = true # use n and N to move between diff sections dark = true # or light = true, or omit for auto-detection [merge] conflictStyle = zdiff3 ``` -------------------------------- ### Run Clippy Linter Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Check for common Rust code issues and style problems using the Clippy linter. ```shell cargo clippy ``` -------------------------------- ### Custom Protocol for Opening Files Source: https://github.com/dandavison/delta/blob/main/manual/src/hyperlinks.md Configure Delta to use a custom URL protocol for opening files. This requires registering the protocol with your operating system to invoke a script. ```gitconfig [delta] hyperlinks = true hyperlinks-file-link-format = "my-file-line-protocol://{path}:{line}" ``` -------------------------------- ### Activate Side-by-Side View via Environment Variable Source: https://github.com/dandavison/delta/blob/main/manual/src/side-by-side-view.md Use the DELTA_FEATURES environment variable to activate side-by-side view. This is a convenient way to toggle the feature. ```sh export DELTA_FEATURES=+side-by-side # activate export DELTA_FEATURES=+ # deactivate ``` -------------------------------- ### Diff Files Using Process Substitution Source: https://github.com/dandavison/delta/blob/main/manual/src/usage.md Leverage shell process substitution with Delta to compare the output of commands, such as sorted file contents. ```sh delta <(sort file1) <(sort file2) ``` -------------------------------- ### Delta Command Execution with Git Diff Input Source: https://github.com/dandavison/delta/blob/main/etc/performance/index.html This snippet details the performance metrics for executing a Delta command with a git diff input. It captures various performance indicators and includes a detailed commit message explaining a fix for a panic condition. ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.98083996069, "user": 1.8008996949999996 } ``` ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.7728469666900002, "user": 1.8008996949999996 } ``` ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.7864244206900002, "user": 1.8008996949999996 } ``` ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.7864244206900002, "user": 1.8008996949999996 } ``` ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.76932616669, "user": 1.8008996949999996 } ``` ```json { "command": "/tmp/chronologer/delta/executables/050551ac99d47e7772ab0413ef1e5bd10a562365 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1577545373-050551ac99d47e7772ab0413ef1e5bd10a562365", "max": 1.98083996069, "mean": 1.8181036060900002, "median": 1.7810805156900003, "message": "Fix panic when showing a diff which contains a diff\n\nWhen committing e.g. a patch-file in a git repository that has a line\nwhich contains \`---\ \` only, \`delta\` fails with the following error (as it\nexpects such a line to contain keywords for the diff):\n\n\`\`\`\nthread 'delta::tests::test_diff_in_diff' panicked at 'byte index 2 is out of bounds of \`\`\`', src/libcore/str/mod.rs:2017:9\nnote: run with \`RUST_BACKTRACE=1\` environment variable to display a backtrace.\n\nThis patch changes the diffing behavior to ensure that lines containing\n\`---\ \` only won't be parsed.\n", "min": 1.76932616669, "stddev": 0.09122061598546864, "system": 0.07496427000000001, "time": 1.7864244206900002, "user": 1.8008996949999996 } ``` -------------------------------- ### Build Debug Version Source: https://github.com/dandavison/delta/blob/main/CONTRIBUTING.md Compile a debug version of the Delta executable. This build is faster to compile but has lower performance. ```shell cargo build ``` -------------------------------- ### Delta Execution Performance Metrics Source: https://github.com/dandavison/delta/blob/main/etc/performance/index.html This snippet shows performance metrics for a Delta command execution. It includes statistics like mean, median, min, max, and standard deviation for user and system time, as well as overall time. ```json { "stddev": 0.018322650685448385, "system": 0.06203837999999999, "time": 1.6995923621300002, "user": 1.7079396000000002 } ``` -------------------------------- ### Jujutsu Configuration for Delta Source: https://github.com/dandavison/delta/blob/main/manual/src/configuration.md Configuration for Jujutsu users to integrate Delta as their diff pager and formatter. ```toml [ui] pager = "delta" diff-formatter = ":git" ``` -------------------------------- ### Enable Line Numbers in Delta Source: https://github.com/dandavison/delta/blob/main/manual/src/line-numbers.md To enable line numbers, set `line-numbers = true` in your delta configuration. Refer to `delta --help` for more options. ```gitconfig [delta " line-numbers = true ] ``` -------------------------------- ### One-off Delta Configuration in Git Command Source: https://github.com/dandavison/delta/blob/main/manual/src/configuration.md Using 'git -c' to apply a specific Delta configuration option for a single Git command. ```sh git -c delta.line-numbers=false show ``` -------------------------------- ### Enable Side-by-Side Feature with DELTA_FEATURES Source: https://github.com/dandavison/delta/blob/main/manual/src/tips-and-tricks/toggling-delta-features.md Use this command to enable the 'side-by-side' feature by setting the DELTA_FEATURES environment variable. Ensure 'side-by-side' is not enabled in your main delta configuration. ```sh export DELTA_FEATURES=+side-by-side ``` -------------------------------- ### Including Delta Config from Another File Source: https://github.com/dandavison/delta/blob/main/manual/src/configuration.md Git configuration directive to include settings from a separate Delta configuration file. ```gitconfig [include] path = ~/src/devenv/dotfiles/delta/delta.gitconfig ``` -------------------------------- ### Define Custom Named Colors and Styles in Delta Themes Source: https://github.com/dandavison/delta/blob/main/manual/src/color-moved-support.md Configure custom named colors and reference them within styles in Delta themes. Styles can also reference other defined styles, enabling complex and reusable styling configurations. ```gitconfig [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 ``` -------------------------------- ### Include Delta Themes in Gitconfig Source: https://github.com/dandavison/delta/blob/main/manual/src/custom-themes.md Add this configuration to your gitconfig file to include themes from the Delta repository. Replace '/PATH/TO/delta/themes.gitconfig' with the actual path to the file. ```gitconfig [include] path = /PATH/TO/delta/themes.gitconfig ``` -------------------------------- ### Vega-Lite Boxplot Specification Source: https://github.com/dandavison/delta/blob/main/etc/performance/index.html This Vega-Lite specification defines a boxplot to visualize performance metrics. It uses sample data including command, commit, and various time measurements. ```json var boxplotSpec = { "$schema": "https://vega.github.io/schema/vega-lite/v3.json", "data": { "values": [ { "command": "/tmp/chronologer/delta/executables/5a4361fa037090adf729ab3f161832d969abc576 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561325305-5a4361fa037090adf729ab3f161832d969abc576", "max": 0.013288195465, "mean": 0.006001176865, "median": 0.004928057465000001, "message": "cargo new delta\n", "min": 0.003220796465, "stddev": 0.004157057519168492, "system": 0.0016010150000000001, "time": 0.013288195465, "user": 0.0013687749999999996 }, { "command": "/tmp/chronologer/delta/executables/5a4361fa037090adf729ab3f161832d969abc576 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561325305-5a4361fa037090adf729ab3f161832d969abc576", "max": 0.013288195465, "mean": 0.006001176865, "median": 0.004928057465000001, "message": "cargo new delta\n", "min": 0.003220796465, "stddev": 0.004157057519168492, "system": 0.0016010150000000001, "time": 0.0050741144650000005, "user": 0.0013687749999999996 }, { "command": "/tmp/chronologer/delta/executables/5a4361fa037090adf729ab3f161832d969abc576 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561325305-5a4361fa037090adf729ab3f161832d969abc576", "max": 0.013288195465, "mean": 0.006001176865, "median": 0.004928057465000001, "message": "cargo new delta\n", "min": 0.003220796465, "stddev": 0.004157057519168492, "system": 0.0016010150000000001, "time": 0.003494720465, "user": 0.0013687749999999996 }, { "command": "/tmp/chronologer/delta/executables/5a4361fa037090adf729ab3f161832d969abc576 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561325305-5a4361fa037090adf729ab3f161832d969abc576", "max": 0.013288195465, "mean": 0.006001176865, "median": 0.004928057465000001, "message": "cargo new delta\n", "min": 0.003220796465, "stddev": 0.004157057519168492, "system": 0.0016010150000000001, "time": 0.003220796465, "user": 0.0013687749999999996 }, { "command": "/tmp/chronologer/delta/executables/5a4361fa037090adf729ab3f161832d969abc576 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561325305-5a4361fa037090adf729ab3f161832d969abc576", "max": 0.013288195465, "mean": 0.006001176865, "median": 0.004928057465000001, "message": "cargo new delta\n", "min": 0.003220796465, "stddev": 0.004157057519168492, "system": 0.0016010150000000001, "time": 0.004928057465000001, "user": 0.0013687749999999996 }, { "command": "/tmp/chronologer/delta/executables/4404c17c22e593db5758884e26327309c4ccb219 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561327607-4404c17c22e593db5758884e26327309c4ccb219", "max": 0.007402604130000001, "mean": 0.005181866930000002, "median": 0.003981811130000001, "message": "Read from stdin, write to stdout\n", "min": 0.003600826130000001, "stddev": 0.001971755776176325, "system": 0.0016420699999999996, "time": 0.007267979130000002, "user": 0.001356285 }, { "command": "/tmp/chronologer/delta/executables/4404c17c22e593db5758884e26327309c4ccb219 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561327607-4404c17c22e593db5758884e26327309c4ccb219", "max": 0.007402604130000001, "mean": 0.005181866930000002, "median": 0.003981811130000001, "message": "Read from stdin, write to stdout\n", "min": 0.003600826130000001, "stddev": 0.001971755776176325, "system": 0.0016420699999999996, "time": 0.003981811130000001, "user": 0.001356285 }, { "command": "/tmp/chronologer/delta/executables/4404c17c22e593db5758884e26327309c4ccb219 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561327607-4404c17c22e593db5758884e26327309c4ccb219", "max": 0.007402604130000001, "mean": 0.005181866930000002, "median": 0.003981811130000001, "message": "Read from stdin, write to stdout\n", "min": 0.003600826130000001, "stddev": 0.001971755776176325, "system": 0.0016420699999999996, "time": 0.003600826130000001, "user": 0.001356285 }, { "command": "/tmp/chronologer/delta/executables/4404c17c22e593db5758884e26327309c4ccb219 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561327607-4404c17c22e593db5758884e26327309c4ccb219", "max": 0.007402604130000001, "mean": 0.005181866930000002, "median": 0.003981811130000001, "message": "Read from stdin, write to stdout\n", "min": 0.003600826130000001, "stddev": 0.001971755776176325, "system": 0.0016420699999999996, "time": 0.0036561141300000006, "user": 0.001356285 }, { "command": "/tmp/chronologer/delta/executables/4404c17c22e593db5758884e26327309c4ccb219 < /tmp/chronologer/delta/input.gitdiff > /dev/null", "commit": "1561327607-4404c17c22e593db5758884e26327309c4ccb219", "max": 0.007402604130000001, "mean": 0.005181866930000002, "median": 0.003981811130000001, "message": "Read from stdin, write to stdout\n", "min": 0.003600826130000001, "stddev": 0.001971755776176325, "system": 0.0016420699999999996, "time": 0.007402604130000001, "user": 0.001356285 } ] }, "mark": "tick", "encoding": { "y": { "field": "time", "type": "quantitative", "axis": null }, "x": { "field": "commit", "type": "nominal", "axis": null }, "color": { "field": "message", "type": "nominal" } } } ```