view src/which.sh @ 28660:a3bcb2a30572 v8.2.4854

patch 8.2.4854: array size does not match usage Commit: https://github.com/vim/vim/commit/2f7e00a8aeceaf1d682d9e797149c1c51654ff68 Author: Christian Brabandt <cb@256bit.org> Date: Mon May 2 00:06:51 2022 +0100 patch 8.2.4854: array size does not match usage Problem: Array size does not match usage. Solution: Make array size 3 instead of 4. (Christian Brabandt, closes https://github.com/vim/vim/issues/10336)
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 May 2022 01:15: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