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:
23
modules/utility/functions/diff
Normal file
23
modules/utility/functions/diff
Normal 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 "$@"
|
||||
|
Reference in New Issue
Block a user