1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 10:51:41 +00:00

[#149] Move diff, wdiff, make into their own files

This commit is contained in:
Sorin Ionescu
2012-06-03 14:16:47 -04:00
parent aa36596287
commit 45ab153c64
4 changed files with 74 additions and 41 deletions

View File

@ -0,0 +1,23 @@
#
# Highlights diff output.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
if zstyle -t ':omz:module:utility:diff' color; then
function diff {
if (( $+commands[colordiff] )); then
"$commands[diff]" --unified "$@" | colordiff --difftype diffu
elif (( $+commands[git] )); then
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
else
"$commands[diff]" --unified "$@"
fi
}
else
unfunction diff
fi
diff --unified "$@"