pacdiff: allow DIFFPROG to contain commandline options

Also use 'vim -d' as default diff viewer.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2014-06-29 17:55:06 +10:00
parent 73717f89df
commit 79548e0d78
1 changed files with 3 additions and 3 deletions

View File

@ -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