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:
parent
73717f89df
commit
79548e0d78
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ shopt -s extglob
|
||||||
declare -r myname='pacdiff'
|
declare -r myname='pacdiff'
|
||||||
declare -r myver='@PACKAGE_VERSION@'
|
declare -r myver='@PACKAGE_VERSION@'
|
||||||
|
|
||||||
diffprog=${DIFFPROG:-vimdiff}
|
diffprog=${DIFFPROG:-'vim -d'}
|
||||||
diffsearchpath=${DIFFSEARCHPATH:-/etc}
|
diffsearchpath=${DIFFSEARCHPATH:-/etc}
|
||||||
USE_COLOR='y'
|
USE_COLOR='y'
|
||||||
declare -a oldsaves
|
declare -a oldsaves
|
||||||
|
@ -49,7 +49,7 @@ General Options:
|
||||||
--nocolor remove colors from output
|
--nocolor remove colors from output
|
||||||
|
|
||||||
Environment Variables:
|
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)
|
DIFFSEARCHPATH override the search path. (only when using find)
|
||||||
(default: /etc)
|
(default: /etc)
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ done
|
||||||
|
|
||||||
m4_include(../scripts/library/term_colors.sh)
|
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."
|
error "Cannot find the $diffprog binary required for viewing differences."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue