From f4fb1ff21681ed39d28cd73d5dc53e52886dcbaf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Jan=C5=AF?= <xjanu@fi.muni.cz>
Date: Thu, 15 Apr 2021 10:17:58 +0200
Subject: [PATCH] Use diff's side-by-side display option by default.

---
 .zshrc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.zshrc b/.zshrc
index 98794be..9bbb8a1 100644
--- a/.zshrc
+++ b/.zshrc
@@ -139,6 +139,13 @@ alias "ghc"="ghc -dynamic"
 alias "less"="less -R"
 ###
 
+### Better diff
+# Note: not an alias so that `tput cols` gets always evaluated
+diff() {
+    command diff --color=auto --side-by-side -W `tput cols` $@
+}
+###
+
 ### Colored man pages
 man() {
     LESS_TERMCAP_md=$'\e[01;31m' \
-- 
GitLab