From 74f782184c864d45aca6a3bfe4cc492557a319a4 Mon Sep 17 00:00:00 2001 From: SkyperTHC Date: Wed, 13 Dec 2023 16:37:14 +0000 Subject: [PATCH] delta --- guest/fs-root/sf/bin/d | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 guest/fs-root/sf/bin/d diff --git a/guest/fs-root/sf/bin/d b/guest/fs-root/sf/bin/d new file mode 100755 index 0000000..c8860b4 --- /dev/null +++ b/guest/fs-root/sf/bin/d @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +{ [[ -n $SF_BINDIR ]] && source "${SF_BINDIR}/funcs.sh"; } || source "/sf/bin/funcs.sh" + +[[ $# -ne 2 ]] && { echo -e >&2 "${CY}ERROR${CN}: d "; exit 255; } + +# cut & paste this into your shell on your workstation or add to ~/.bashrc +d() { + [[ -n "${DELTA_OPTS}" ]] && { + diff -u "$@" | delta ${DELTA_OPTS} + return + } + diff -u "$@" | delta --color-only +} + +d "$@"