From 62648d71bb05116287206d83181f9daa5a59ba67 Mon Sep 17 00:00:00 2001 From: Monson Shao Date: Thu, 2 Jul 2020 02:51:13 +0800 Subject: [PATCH] lib: enable diff color (#8807) --- lib/theme-and-appearance.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 5016d86ca..5c1b6db12 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -39,6 +39,11 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then fi fi +# enable diff color if possible. +if diff --color . . &>/dev/null; then + alias diff='diff --color' +fi + setopt auto_cd setopt multios setopt prompt_subst