view src/which.sh @ 19453:12a2df388bca v8.2.0284

patch 8.2.0284: Vim9: assignment test fails Commit: https://github.com/vim/vim/commit/c0d656c89df4cf5a7d712dfb264853b9ca7d586f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 19 21:12:40 2020 +0100 patch 8.2.0284: Vim9: assignment test fails Problem: Vim9: assignment test fails. Solution: Avoid duplicating "s:".
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Feb 2020 21:15:03 +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