view src/which.sh @ 16945:efd36a9052cc v8.1.1473

patch 8.1.1473: new resolve() implementation causes problem for plugins commit https://github.com/vim/vim/commit/4a792c87b9a643a949ee36106a2f7e971dc633f8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 6 12:22:41 2019 +0200 patch 8.1.1473: new resolve() implementation causes problem for plugins Problem: New resolve() implementation causes problem for plugins. Solution: Only resolve a resparse point after checking it is needed. (Ken Takata, closes #4492)
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Jun 2019 12:30:05 +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