dotfiles

personal configuration files and scripts
git clone https://tongong.net/git/dotfiles.git
Log | Files | Refs | README

commit 02b695e2b39fa0659a9a10ef7c6361b0fa40c771
parent f13ed2fbd3764aca17e65b80035fa96a6a784077
Author: tongong <tongong@gmx.net>
Date:   Mon, 25 Oct 2021 17:02:07 +0200

added diffc script

Diffstat:
Ascripts/diffc | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/scripts/diffc b/scripts/diffc @@ -0,0 +1,9 @@ +#!/bin/sh -eu + +# Use diff-highlight to show word-level differences +# https://stackoverflow.com/a/39865453 +diffhighlight="/usr/share/git/diff-highlight/diff-highlight" + +diff -U3 --minimal "$@" | + sed 's/^-/\x1b[1;31m-/;s/^+/\x1b[1;32m+/;s/^@/\x1b[1;34m@/;s/$/\x1b[0m/' | + "$diffhighlight"