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`.
This commit is contained in:
Indrajit Raychaudhuri 2021-06-22 22:17:29 -05:00 committed by Indrajit Raychaudhuri
parent 866d5dfccd
commit f3c92ffeb3
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@
if zstyle -t ':prezto:module:utility:diff' color \
&& (( $+commands[colordiff] )); then
command colordiff "$@"
command diff "$@" | colordiff
else
command diff "$@"
fi