From 74f4871d105d5aa319425b0868d9f8b2146baf41 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 22 Jun 2021 22:17:29 -0500 Subject: [PATCH] utility: Pipe diff output through colordiff Instead of aliasing `colordiff` behaves better as `stdin` filter. This is useful in retaining color escape sequences when used with `less`. --- modules/utility/functions/diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utility/functions/diff b/modules/utility/functions/diff index 4e08494..2e812f2 100644 --- a/modules/utility/functions/diff +++ b/modules/utility/functions/diff @@ -9,7 +9,7 @@ if zstyle -t ':prezto:module:utility:diff' color \ && (( $+commands[colordiff] )); then - command colordiff "$@" + command diff "$@" | colordiff else command diff "$@" fi