From 6629644e75337175c83425b9d9c3253e3464b81e Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Tue, 12 Nov 2024 18:03:28 -0500 Subject: [PATCH] git: add experimental CSV diff --- links/gitattributes | 1 + links/gitconfig | 2 ++ 2 files changed, 3 insertions(+) diff --git a/links/gitattributes b/links/gitattributes index bbfd1d2b..67d7a83c 100644 --- a/links/gitattributes +++ b/links/gitattributes @@ -24,3 +24,4 @@ Pipfile.lock diff=json *.ins diff=tex *.yaml diff=yq *.yml diff=yq +*.csv diff=csv diff --git a/links/gitconfig b/links/gitconfig index fa7f5b26..01389386 100644 --- a/links/gitconfig +++ b/links/gitconfig @@ -100,6 +100,8 @@ textconv = "f(){ gron \"$1\" 2>/dev/null || cat \"$1\"; }; f" [diff "yq"] textconv = "f(){ yq -P eval 'sort_keys(..)' \"$1\" 2>/dev/null || cat \"$1\"; }; f" +[diff "csv"] + textconv = "f() { mlr --csv cat \"$1\" || true; }; f" [difftool] prompt = no [merge]