From 79548e0d78843dbf2266658c99cae6dafb643130 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 29 Jun 2014 17:55:06 +1000 Subject: pacdiff: allow DIFFPROG to contain commandline options Also use 'vim -d' as default diff viewer. Signed-off-by: Allan McRae --- contrib/pacdiff.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in index c8fbe74b..ecb6ae29 100644 --- a/contrib/pacdiff.sh.in +++ b/contrib/pacdiff.sh.in @@ -23,7 +23,7 @@ shopt -s extglob declare -r myname='pacdiff' declare -r myver='@PACKAGE_VERSION@' -diffprog=${DIFFPROG:-vimdiff} +diffprog=${DIFFPROG:-'vim -d'} diffsearchpath=${DIFFSEARCHPATH:-/etc} USE_COLOR='y' declare -a oldsaves @@ -49,7 +49,7 @@ General Options: --nocolor remove colors from output Environment Variables: - DIFFPROG override the merge program: (default: vimdiff) + DIFFPROG override the merge program: (default: 'vim -d') DIFFSEARCHPATH override the search path. (only when using find) (default: /etc) @@ -118,7 +118,7 @@ done m4_include(../scripts/library/term_colors.sh) -if ! type -p $diffprog >/dev/null; then +if ! type -p ${diffprog%% *} >/dev/null; then error "Cannot find the $diffprog binary required for viewing differences." exit 1 fi -- cgit v1.2.3-24-g4f1b