Browse Source

[Fix #195] Fallback to the default command

master
Sorin Ionescu 13 years ago
parent
commit
e4be6d633f
  1. 2
      modules/utility/functions/diff
  2. 2
      modules/utility/functions/make
  3. 2
      modules/utility/functions/wdiff

2
modules/utility/functions/diff

@ -11,6 +11,8 @@ function diff {
command diff --unified "$@" | colordiff --difftype diffu command diff --unified "$@" | colordiff --difftype diffu
elif (( $+commands[git] )); then elif (( $+commands[git] )); then
git --no-pager diff --color=auto --no-ext-diff --no-index "$@" git --no-pager diff --color=auto --no-ext-diff --no-index "$@"
else
command diff --unified "$@"
fi fi
else else
command diff --unified "$@" command diff --unified "$@"

2
modules/utility/functions/make

@ -9,6 +9,8 @@ function make {
if zstyle -t ':omz:module:utility:make' color; then if zstyle -t ':omz:module:utility:make' color; then
if (( $+commands[colormake] )); then if (( $+commands[colormake] )); then
colormake "$@" colormake "$@"
else
command make "$@"
fi fi
else else
command make "$@" command make "$@"

2
modules/utility/functions/wdiff

@ -18,6 +18,8 @@ function wdiff {
| sed 's/^\(@@\( [+-][[:digit:]]*,[[:digit:]]*\)\{2\} @@\)$/;5;6m\10m/g' | sed 's/^\(@@\( [+-][[:digit:]]*,[[:digit:]]*\)\{2\} @@\)$/;5;6m\10m/g'
elif (( $+commands[git] )); then elif (( $+commands[git] )); then
git --no-pager diff --color=auto --no-ext-diff --no-index --color-words "$@" git --no-pager diff --color=auto --no-ext-diff --no-index --color-words "$@"
else
command wdiff "$@"
fi fi
else else
command wdiff "$@" command wdiff "$@"

Loading…
Cancel
Save