1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-16 02:41:13 +00:00
prezto/modules/utility/functions/diff
Indrajit Raychaudhuri f3c92ffeb3 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`.
2021-06-24 17:45:29 -05:00

18 lines
266 B
Plaintext

#
# Highlights diff output.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# function diff {
if zstyle -t ':prezto:module:utility:diff' color \
&& (( $+commands[colordiff] )); then
command diff "$@" | colordiff
else
command diff "$@"
fi
# }