[CENTOS] [Linux convenient command] Try to insert delta

environment

Overview

When I wanted to diff, the default one had no color and the display was hard to see. image.png

After investigating, I found that there is something called colordiff. https://qiita.com/trapple/items/6657b903bf027464e70d

This alone seemed to be good, but I thought it would be easier to see if I used a rust product called delta, so I considered this. https://wonderwall.hatenablog.com/entry/rust-delta

delta installation

download
$ wget https://github.com/dandavison/delta/releases/download/0.4.1/delta-0.4.1-x86_64-unknown-linux-musl.tar.gz
$ tar -zxvf delta-0.4.1-x86_64-unknown-linux-musl.tar.gz
$ cd delta-0.4.1-x86_64-unknown-linux-musl

I already have a bin file so I just had to move it

$ mv ./delta /usr/local/bin

delta setting

.gitconfig


[core]
  pager = delta
[interactive]
  diffFilter = delta --color-only

Now delta is reflected when you do git diff

Adjust various settings

.gitconfig


[delta]
  diff-so-fancy=true
  keep-plus-minus-markers=true
  minus-emph-style="bold 94 89"
  plus-emph-style="bold 29 29"
  hunk-header-style="omit"
  line-numbers=true

result

What git diff looks like

before image.png

after image.png

Normal diff look

This makes it easier to see because you can replace the diff when it is not git with the delta command.

before image.png

after image.png

Recommended Posts

[Linux convenient command] Try to insert delta
Try to use docker command without sudo.
Try to build Java8 environment on Amazon Linux2
Easy setup to run docker command without sudo (Linux)
Command to try using Docker for the time being
Introduction to javadoc command
Introduction to jar command
Introduction to java command
Introduction to javac command