view src/which.sh @ 27398:472bb63632bd v8.2.4227

patch 8.2.4227: Vim9: using "lockvar!" in :def function does not work Commit: https://github.com/vim/vim/commit/e939f5ebbae8dd7825d62d84e0c9910fa1756a9c Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 26 21:32:59 2022 +0000 patch 8.2.4227: Vim9: using "lockvar!" in :def function does not work Problem: Vim9: using "lockvar!" in :def function does not work. Solution: Add "!" instead of "-1". (closes https://github.com/vim/vim/issues/9634)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Jan 2022 22:45:04 +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