view src/which.sh @ 27032:18cafa092e8d v8.2.4045

patch 8.2.4045: some global functions are only used in one file Commit: https://github.com/vim/vim/commit/782b43d89473dac00e3a8e02224a8330b88dbfef Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Jan 8 18:43:40 2022 +0000 patch 8.2.4045: some global functions are only used in one file Problem: Some global functions are only used in one file. Solution: Make the functions static. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9492)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 19:45:03 +0100
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