cargo git-delta 0.0.17

latest releases: 0.17.0, 0.16.5, 0.16.4...
4 years ago

This release brings new command line options for controlling the colors used for structural element decorations (commits, files, hunk markers), and a consistent pattern for specifying colors for all options that accept a color as a value.

New options are

--commit-style <commit_style>
    Formatting style for the commit section of git output. Options are: plain, box. [default: plain]

--file-style <file_style>              
    Formatting style for the file section of git output. Options are: plain, box, underline. [default:  
    underline]
--hunk-style <hunk_style>
    Formatting style for the hunk-marker section of git output. Options are: plain, box. [default: box]

The --help output now features the following.

Colors
------

All delta color options work the same way. There are three ways to specify a color:

1. RGB hex code

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

2. 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:
   bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white

   An example of using an ANSI color name is:
   --file-color="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.

3. ANSI color number

   An example of using an ANSI color number is:
   --file-color=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).
  • [closed] Support mapping 24 bit colors to 8 bit approximation #110
  • [closed] Add --paging option to control whether a pager is used #108
  • [closed] Add option to change colors of box/underline/file text #99 #103
  • [closed] Show binary files changes in delta output #93

Don't miss a new git-delta release

NewReleases is sending notifications on new releases.