This release introduces a cosmetic change to delta output: the line number (when full line-numbers
mode is not active) is now displayed in the hunk header line, along with the hunk header code fragment, and optionally a file path. Thanks to @infokiller and @torarnv for suggesting these changes. For example, it might now look like this, if you use hunk-header-style = file line-number syntax
:
Use hunk-header-style
to configure it:
--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. If included in the hunk header, 'file' and 'line-number' are styled according to 'file-style' and
'hunk-header-decoration-style' respectively. The style 'omit' can be used to remove the hunk header section
from the output [default: line-number syntax]
If you are displaying the file path in the hunk header, you may want to get rid of the main file line. Use file-style = <my-file-color> omit
to set the color of the file in the hunk header while deactivating the main file section.
The release also fixes a bug that was introduced in the last release when using delta as a unified diff replacement, i.e. delta file_a file_b
. (#463).
- [closed] 🐛 delta 0.4.5 binary release messes up terminal on Ubuntu 20 04 #463
- [closed] 🐛 delta 0.4.5 binary release does not run on macOS 10.11 (El Capitan) #462
- [closed] ReadMe can now use latest less.exe (instead of forked version) #461
- [closed] 🐛 bump-homebrew-formula GitHub CD action is not working #460
- [closed] 🚀 Is it possible to show the file path in the hunk header? #309
- [closed] 🐛 side-by-side alignment incorrect when tabs present #308