view src/which.sh @ 27348:9a9c34c84cd4 v8.2.4202

patch 8.2.4202: Vim9: cannot export function that exists globally Commit: https://github.com/vim/vim/commit/acc4b5648b49ec13c4f35ee0bf552eda71b0c372 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 24 13:54:45 2022 +0000 patch 8.2.4202: Vim9: cannot export function that exists globally Problem: Vim9: cannot export function that exists globally. Solution: When checking if a function already exists only check for script-local functions. (closes #9615)
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 Jan 2022 15:00: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