diff --git a/bin/delta-wrapper b/bin/delta-wrapper index c875471..29f554c 100755 --- a/bin/delta-wrapper +++ b/bin/delta-wrapper @@ -3,5 +3,7 @@ # - Use `git-delta` if installed. # - Otherwise, fall back to `less`. command -v delta >/dev/null 2>&1 && exec delta --true-color=always "$@" -exec less -F -X "$@" +# Consume option that would confuse `less`. +[ "$1" = "--side-by-side" ] && shift +exec less -F -X "$@" diff --git a/config/git/config b/config/git/config index 8a8aeeb..237303f 100644 --- a/config/git/config +++ b/config/git/config @@ -4,6 +4,8 @@ ba = bv --all cm = commit --verbose co = checkout + d = diff + ds = !GIT_PAGER=\"delta-wrapper --side-by-side\" git diff l = log --graph --pretty=basic ln = log --graph --pretty=name ll = log --graph --decorate --stat