view src/which.sh @ 20330:a7dbf32b5cc0 v8.2.0720

patch 8.2.0720: occasional exit when encountering an X error Commit: https://github.com/vim/vim/commit/b1062eb23e7a7a8b44f3416e79c3b28aa6c6c229 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 9 16:11:33 2020 +0200 patch 8.2.0720: occasional exit when encountering an X error Problem: Occasional exit when encountering an X error. (Manfred Lotz) Solution: On an X error do not exit, do preserve files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 May 2020 16:15:04 +0200
parents 3fc0f57ecb91
children
line wrap: on
line source

#! /bin/sh
#
# which.sh -- find where an executable is located.  It's here because the
# "which" command is not supported everywhere.  Used by Makefile.

IFS=":"
for ac_dir in $PATH; do
	if test -f "$ac_dir/$1"; then
		echo "$ac_dir/$1"
		break
	fi
done