From 657ad0523d5a29e0bdc8af0cd63c23ac597406e8 Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Wed, 25 Jan 2023 08:50:06 +0100 Subject: [PATCH] fix(theme-and-appearance): fix `diff` completion in macOS Closes #11416 Closes #11454 --- lib/theme-and-appearance.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 00947f72d..9b908bef0 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -41,7 +41,11 @@ fi # enable diff color if possible. if command diff --color /dev/null /dev/null &>/dev/null; then - alias diff='diff --color' + function color-diff { + diff --color $@ + } + alias diff="color-diff" + compdef _diff color-diff # compdef is already loaded by this point fi setopt auto_cd