view src/which.sh @ 22216:f9b4576a618b v8.2.1657

patch 8.2.1657: Vim9: no proper error for nested ":def!" Commit: https://github.com/vim/vim/commit/8b848cafb0a88f8d8e8f46caa8d67431b4faa374 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 10 22:28:01 2020 +0200 patch 8.2.1657: Vim9: no proper error for nested ":def!" Problem: Vim9: no proper error for nested ":def!". Solution: Check for "!". (closes https://github.com/vim/vim/issues/6920)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Sep 2020 22:30: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