view src/which.sh @ 21753:9ef7ae8ab51c v8.2.1426

patch 8.2.1426: Vim9: cannot call autoload function in :def function Commit: https://github.com/vim/vim/commit/a177344dc0c337e5b272c1c59d13964a8318bcfa Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 15:21:22 2020 +0200 patch 8.2.1426: Vim9: cannot call autoload function in :def function Problem: Vim9: cannot call autoload function in :def function. Solution: Load the autoload script. (closes https://github.com/vim/vim/issues/6690)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 15:30: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