dotwryn/bin/vim

23 lines
460 B
Plaintext
Raw Normal View History

2022-08-16 23:44:28 -06:00
#!/bin/sh
2023-09-05 10:40:47 -06:00
#####################################################################
2023-11-11 07:16:04 -07:00
2023-09-05 10:40:47 -06:00
VIM_ARGS=(-p)
2023-11-11 07:16:04 -07: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 10:40:47 -06:00
#####################################################################
2023-11-11 07:16:04 -07:00
exec $VIM ${VIM_ARGS[@]} "$@"