git: add side-by-side diffs

This commit is contained in:
Fernando Schauenburg 2023-07-12 19:52:39 +02:00
parent 581c7d07e4
commit f323416c59
2 changed files with 5 additions and 1 deletions

View file

@ -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 "$@"

View file

@ -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