view src/which.sh @ 29385:5b7b5b372e2d v9.0.0035

patch 9.0.0035: spell dump may go beyond end of an array Commit: https://github.com/vim/vim/commit/54e5fed6d27b747ff152cdb6edfb72ff60e70939 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 4 13:37:07 2022 +0100 patch 9.0.0035: spell dump may go beyond end of an array Problem: Spell dump may go beyond end of an array. Solution: Limit the word length.
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jul 2022 14: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