view src/which.sh @ 24446:f388a033e568 v8.2.2763

patch 8.2.2763: Vim9: cannot use type in for loop unpack at script level Commit: https://github.com/vim/vim/commit/a3589a0d6cdb314e70421c0f2e5a2d1abf68e597 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 14 13:30:46 2021 +0200 patch 8.2.2763: Vim9: cannot use type in for loop unpack at script level Problem: Vim9: cannot use type in for loop unpack at script level. Solution: Advance over the type name.
author Bram Moolenaar <Bram@vim.org>
date Wed, 14 Apr 2021 13:45: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