mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 19:49:25 +00:00
Rework diff function
This removes --unified from the default options to make it possible to pass -y without worrying about conflicting output formats. diffu has also been added as an alias to make it easier to get output as a unified diff. Fixes #1231
This commit is contained in:
@ -8,14 +8,12 @@
|
||||
function diff {
|
||||
if zstyle -t ':prezto:module:utility:diff' color; then
|
||||
if (( $+commands[colordiff] )); then
|
||||
command colordiff --unified "$@"
|
||||
elif (( $+commands[git] )); then
|
||||
git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
|
||||
command colordiff "$@"
|
||||
else
|
||||
command diff --unified "$@"
|
||||
command diff "$@"
|
||||
fi
|
||||
else
|
||||
command diff --unified "$@"
|
||||
command diff "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user