view src/which.sh @ 19281:9fcdeaa18bd1 v8.2.0199

patch 8.2.0199: Vim9 script commands not sufficiently tested Commit: https://github.com/vim/vim/commit/0f18b6d17baa7d33f209a3184726a162c2bb7ed8 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 2 17:22:27 2020 +0100 patch 8.2.0199: Vim9 script commands not sufficiently tested Problem: Vim9 script commands not sufficiently tested. Solution: Add more tests. Fix script-local function use.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Feb 2020 17:30: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