dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 297ac683252b1a0b801b13ed02e7e954b79f25d8
parent 22bfea325204285d09d23e8dfff4e3f7f58099e8
Author: hhvn <dev@hhvn.uk>
Date:   Sun,  4 Jul 2021 20:43:30 +0100

.c/g/config .s/b/gdiffpager: proper colours for git diff

Diffstat:
M.config/git/config | 3+++
A.scripts/bin/gdiffpager | 12++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/.config/git/config b/.config/git/config @@ -12,6 +12,9 @@ [blame] date = human +[core] + pager = gdiffpager + [alias] hs = !sh ~/.config/git/hist fm = !sh ~/.config/git/format-patch diff --git a/.scripts/bin/gdiffpager b/.scripts/bin/gdiffpager @@ -0,0 +1,12 @@ +#!/bin/sh + +san(){ + tr '[' '\f' +} + +san | +sed " + s/$(tput bold | san)/$(tput setaf 95)/g; + s/$(tput setaf 1 | san)/$(tput setaf 10)/g; + s/$(tput setaf 2 | san)/$(tput setaf 36)/g; + " | tr '\f' '[' | less -R