dotwryn/bin/vim

23 lines
460 B
Plaintext
Raw Permalink Normal View History

2022-08-17 05:44:28 +00:00
#!/bin/sh
2023-09-05 16:40:47 +00:00
#####################################################################
2023-11-11 14:16:04 +00:00
2023-09-05 16:40:47 +00:00
VIM_ARGS=(-p)
2023-11-11 14:16:04 +00:00
BUILD_PREFERENCE=(
/usr/local/bin/vim # source build
/usr/bin/vim # package manager build
)
for V in ${BUILD_PREFERENCE[@]}
do
[ -f $V ] && VIM=$V && break
done
[ -f $VIM ] || {
echo "unable to find a build for vim; is it installed?" >&2
exit 1
}
2023-09-05 16:40:47 +00:00
#####################################################################
2023-11-11 14:16:04 +00:00
exec $VIM ${VIM_ARGS[@]} "$@"