From aee474d1480eebfd63e5bb47ee1e9a1f75a2899a Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 13 Nov 2023 16:13:13 -0500 Subject: [PATCH] Use delta for git diffs --- configure/git.sh | 10 ++++++++-- installer/ubi.sh | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure/git.sh b/configure/git.sh index f8bbd9ef..5975c534 100755 --- a/configure/git.sh +++ b/configure/git.sh @@ -14,7 +14,6 @@ git config --global diff.algorithm histogram git config --global github.user oalders git config --global help.autocorrect 10 git config --global init.defaultBranch main -git config --global merge.conflictstyle diff3 git config --global push.default current git config --global rebase.autosquash true git config --global rebase.instructionFormat "(%an <%ae>) %s" @@ -65,7 +64,14 @@ git config --global alias.view-stash 'stash show -p stash@{0}' git config --global color.ui auto git config --global core.excludesfile ~/.gitignore_global -git config --global core.pager 'less' + +# configure delta as git's pager +git config --global core.pager 'delta' +git config --global delta.light false +git config --global delta.navigate true +git config --global diff.colorMoved default +git config --global interactive.diffFilter 'delta --color-only' +git config --global merge.conflictStyle diff3 # takes a commit name as sole arg git config --global alias.whatis "show -s --pretty='tformat:%h (%s, %ad)' --date=short" diff --git a/installer/ubi.sh b/installer/ubi.sh index 4c9313bd..3de836b7 100755 --- a/installer/ubi.sh +++ b/installer/ubi.sh @@ -48,6 +48,7 @@ ubi --project cli/cli --in "$in" --exe gh ubi --project jqlang/jq --in "$in" ubi --project dandavison/delta --in "$in" ubi --project crate-ci/typos --in "$in" +ubi --project dandavison/delta --in "$in" # ubi --project Wilfred/difftastic --exe difft --in "$in" exit