view src/which.sh @ 26672:3516017e5f54 v8.2.3865

patch 8.2.3865: Vim9: compiler complains about using "try" as a struct member Commit: https://github.com/vim/vim/commit/0d807107b66e0d30d4f338c272962af5714c400e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 21 09:42:09 2021 +0000 patch 8.2.3865: Vim9: compiler complains about using "try" as a struct member Problem: Vim9: compiler complains about using "try" as a struct member. Solution: Rename "try" to "tryref".
author Bram Moolenaar <Bram@vim.org>
date Tue, 21 Dec 2021 10:45:04 +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