view src/which.sh @ 19609:fe827d6267c2 v8.2.0361

patch 8.2.0361: internal error when using "0" for a callback Commit: https://github.com/vim/vim/commit/14e57909e662a43a42438e2701654af48af49b03 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 7 16:59:25 2020 +0100 patch 8.2.0361: internal error when using "0" for a callback Problem: Internal error when using "0" for a callback. Solution: Give a normal error. (closes https://github.com/vim/vim/issues/5743)
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 Mar 2020 17:00:06 +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