summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2021-11-23WIP776-non-emph-style-underlineDan Davison
2021-11-23Always use non-emph style for right fillDan Davison
2021-11-23Change rules for non-emph styleDan Davison
Fixes #776 Previously, when a paired plus line had no edits, it received plus-style. With this commit such a line receives plus-non-emph-style. There's no change to unpaired lines (still plus-style) and paired lines with edits (still a mosaic of plus-non-emph-style and plus-emph-style). (The above statements hold for minus lines also). Since *-non-emph-style defaults to *-emph-style, this commit does not result in any change in output for users using the defaults.
2021-11-23Styles demo commitDan Davison
The diff in this commit contains sections with all of the following semantics: minus-style (old line 1) plus-style (new line 1) zero-style (line 2) minus-non-emph-style (old line 4, and unchanged sections of old line 3) minus-emph-style (deleted word "chaffinch" in old line 3) plus-non-emph-style (new line 3, and unchanged sections of new line 4) plus-emph-style (added word "dodo" of new line 4)
2021-11-23Initial file stateDan Davison
2021-11-22Navigate regexp (#782)Wayne Davison
* Allow navigate-regexp value to be overridden. * Don't add an empty label to the navigate_regexp. * Make --hunk-label=str not require --navigate. * Change navigate regexp to navigate regex. * Turn navigate-regex into an Option<String>.
2021-11-22Handle broken pipe error in subcommandsDan Davison
2021-11-22Show colors subcommandDan Davison
Color groups from https://www.w3schools.com/colors/colors_groups.asp
2021-11-22Fix non-compiling code after independent mergesDan Davison
2021-11-22Bump smol_str from 0.1.18 to 0.1.21 (#763)dependabot[bot]
Bumps [smol_str](https://github.com/rust-analyzer/smol_str) from 0.1.18 to 0.1.21. - [Release notes](https://github.com/rust-analyzer/smol_str/releases) - [Commits](https://github.com/rust-analyzer/smol_str/compare/v0.1.18...v0.1.21) --- updated-dependencies: - dependency-name: smol_str dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-22Allow custom colors to be defined in gitconfig (#788)Dan Davison
Similar to 7a64fa5a26314c05c811d7c1276388a4963fa0bd which allowed custom styles. Custom styles must end in -style, but colors can be anything. It unfortunately seems not to be possible currently to store a global reference to git config, hence the size of this commit (passing the reference down the call stack).
2021-11-22Syntax-highlight `git show $revision:./path/to/file.ext` outputDan Davison
2021-11-22Handle grep outputDan Davison
- Handle standard filepath:code and filepath:line_number:code output as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line numbers). - Retain the match highlighting as produced by the grep tool, and expose it in delta's color output styled with grep-match-style. (Note that --color=always is needed to retain the color if piping into delta, but not for `git grep` when delta is configured as git's pager) - Special handling of -p, and -W options of `git grep`: these display the function context in which the matches occur. - `navigate` keybindings jump between match function contexts under `git grep -p` and between matching lines under `git grep -W`. Thanks @zachriggle for the proposal. Fixes #769
2021-11-22Obtain parent git grep command line optionsDan Davison
2021-11-22Refactor: get_painted_file_with_line_number functionDan Davison
2021-11-22Refactor: StyleSectionSpecifier enum for syntax_highlight_and_paint_lineDan Davison
2021-11-22Function to compute text index in string containing ANSI sequencesDan Davison
2021-11-22Clarify tests of ansi_preserving_sliceDan Davison
2021-11-22Parse styles from a string containing ANSI sequencesDan Davison
2021-11-21Support named colors (#786)Dan Davison
https://docs.rs/palette/0.6.0/palette/named/index.html
2021-11-21Enable faking `extract_args()` parameters from process utils (#783)Thomas Otto
The fake value is valid for exactly one call, the state for this is stored per-thread.
2021-11-21Refactor: improve names and mutation in loopDan Davison
2021-11-21Update hoopoe theme to use custom style referencesDan Davison
2021-11-21Set is_emph explicitly on *-emph-stylesDan Davison
This addresses a bug triggered by doing things like minus-style = minus-emph-style That was causing the is_emph bit to be set on minus-style, with undesirable consequences.
2021-11-21Support custom styles in delta gitconfigDan Davison
2021-11-21Allow styles to be specified as references to other stylesDan Davison
2021-11-18Add ProcessInterfaceThomas Otto
2021-11-18Make process utils more genericThomas Otto
2021-11-17Add the --right-arrow option.Wayne Davison
This allows the file1 -> file2 arrow to be configured to whatever characters the user desires. The default is the same unicode arrow as before with 2 spaces after it, since this allows someone to remove the extra spaces that are in the current output.
2021-11-17Use file-modified-label consistently.Wayne Davison
When filtering a diff and when directly diffing files/dirs, use the modified label that is output when interpreting git diffs. This gets rid of the "comparing:" prefix (which was otherwise missing from the --navigate regex) and ensures that a direct diff has a label to stop at when --navigate is enabled. One of the unified-diff tests now uses --file-modified-label=comparing: to generate the same output as before, while the other now uses --navigate to get a delta char label.
2021-11-15Update blame docsDan Davison
2021-11-15Update blame documentationDan Davison
2021-11-15Refactor: utils moduleDan Davison
2021-11-15Handle `git blame` outputDan Davison
Fixes #426 Partial versions of these changes were previously in master and then reverted multiple times. See #746 0745f853d4bed52aca0b6739ac452d54ff54a153 3aab5d19569fa52ace2d7e6d196a1256990c4e20
2021-11-15Support precision specifier in run-time format stringsDan Davison
2021-11-15Clean upDan Davison
2021-11-15Fix test of parent process when run under cargo-tarpaulinDan Davison
2021-11-15Util: check parent process for `git blame` filename (#770)Thomas Otto
Usecase: With delta used as a pager the command `git blame main.rs` calls delta, but the piped data does not mention the filename. Instead try to get the filename extension from the parent `git` process. If that fails try the direct sibling or all other `git blame` processes.
2021-11-15README editDan Davison
2021-11-15Update README ToCDan Davison
2021-11-15Doc: explain invocation of delta by gitDan Davison
2021-11-15Markdown autoformattingDan Davison
2021-11-14Sort config struct entriesDan Davison
2021-11-10Remove +/- line prefix instead of substituting a spaceThomas Otto
Simplifies line handling and printing by removing a "magical" 1-offset previously required in various locations. Now explicitly prepend "" in `tokenize()`.
2021-11-10Add compact debug formatting for StyleThomas Otto
2021-11-07[README] add notes for screen (256color/24bit) (#768)Kriss
Ref.: https://github.com/dandavison/delta/issues/760
2021-11-07Update private Homebrew formula to 0.9.2 (fix #766) (#767)Linda_pp
2021-11-07README: minor editsDan Davison
2021-11-05replace link to XVilka's gist with the updated one (#764)Kriss
To ease collaboration, XVilka has decided to relocate their gist to an actual Github repository a while ago, in oder to facilitate contribu- tions. Ref: https://gist.github.com/XVilka/8346728#gistcomment-3836228 ff.
2021-11-01Simplify lifetime annotation of Painter (#758)Thomas Otto
The struct's lifetime is not used outside new(), and most of the methods used more like free functions, so uniformly use 'a there. Also fix wrongly used lifetime for get_syntax().