view src/which.sh @ 29978:34151eb6ae25 v9.0.0327

patch 9.0.0327: items() does not work on a list Commit: https://github.com/vim/vim/commit/976f859763b215050a03248dbc2bb62fa5d0d059 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 14:34:52 2022 +0100 patch 9.0.0327: items() does not work on a list Problem: items() does not work on a list. (Sergey Vlasov) Solution: Make items() work on a list. (closes https://github.com/vim/vim/issues/11013)
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Aug 2022 15:45:03 +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