view src/which.sh @ 21180:dde4c2e84f5c v8.2.1141

patch 8.2.1141: Vim9: return type of filter() is any Commit: https://github.com/vim/vim/commit/0d94ad69586972e7522ec6ca1441a517af2ade7a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 5 20:16:41 2020 +0200 patch 8.2.1141: Vim9: return type of filter() is any Problem: Vim9: return type of filter() is any. Solution: Use type of the argument.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jul 2020 20:30:06 +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