From e4be6d633f79ba28c67caeb24679f1d2c71be7c3 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 13 Jun 2012 14:08:57 -0400 Subject: [PATCH] [Fix #195] Fallback to the default command --- modules/utility/functions/diff | 2 ++ modules/utility/functions/make | 2 ++ modules/utility/functions/wdiff | 2 ++ 3 files changed, 6 insertions(+) diff --git a/modules/utility/functions/diff b/modules/utility/functions/diff index 77fd014..c41773d 100644 --- a/modules/utility/functions/diff +++ b/modules/utility/functions/diff @@ -11,6 +11,8 @@ function diff { command diff --unified "$@" | colordiff --difftype diffu elif (( $+commands[git] )); then git --no-pager diff --color=auto --no-ext-diff --no-index "$@" + else + command diff --unified "$@" fi else command diff --unified "$@" diff --git a/modules/utility/functions/make b/modules/utility/functions/make index bf242db..08783e9 100644 --- a/modules/utility/functions/make +++ b/modules/utility/functions/make @@ -9,6 +9,8 @@ function make { if zstyle -t ':omz:module:utility:make' color; then if (( $+commands[colormake] )); then colormake "$@" + else + command make "$@" fi else command make "$@" diff --git a/modules/utility/functions/wdiff b/modules/utility/functions/wdiff index b0449d2..a2d49d7 100644 --- a/modules/utility/functions/wdiff +++ b/modules/utility/functions/wdiff @@ -18,6 +18,8 @@ function wdiff { | sed 's/^\(@@\( [+-][[:digit:]]*,[[:digit:]]*\)\{2\} @@\)$/;5;6m\10m/g' elif (( $+commands[git] )); then git --no-pager diff --color=auto --no-ext-diff --no-index --color-words "$@" + else + command wdiff "$@" fi else command wdiff "$@"