summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonson Shao <holymonson@gmail.com>2020-07-02 02:51:13 +0800
committerGitHub <noreply@github.com>2020-07-01 20:51:13 +0200
commit62648d71bb05116287206d83181f9daa5a59ba67 (patch)
treecd196bd3c81476ee412fd597ef3ee72cd766fd8a
parentd24a9dbcccd03f4e1dd4549c94e9c3fe76d88f4b (diff)
downloadzsh-62648d71bb05116287206d83181f9daa5a59ba67.tar.gz
zsh-62648d71bb05116287206d83181f9daa5a59ba67.tar.bz2
zsh-62648d71bb05116287206d83181f9daa5a59ba67.zip
lib: enable diff color (#8807)
-rw-r--r--lib/theme-and-appearance.zsh5
1 files changed, 5 insertions, 0 deletions
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