summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2014-06-29 17:55:06 +1000
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:32 +1000
commit79548e0d78843dbf2266658c99cae6dafb643130 (patch)
tree0dc12a7d71dcdce5610bdca1c518afd2f304c627 /contrib
parent73717f89df6ebf3c03f00a70ca2728c04cebe7a0 (diff)
downloadpacman-79548e0d78843dbf2266658c99cae6dafb643130.tar.xz
pacdiff: allow DIFFPROG to contain commandline options
Also use 'vim -d' as default diff viewer. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pacdiff.sh.in6
1 files changed, 3 insertions, 3 deletions
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