view src/which.sh @ 19507:65049a682574 v8.2.0311

patch 8.2.0311: Vim9: insufficient script tests Commit: https://github.com/vim/vim/commit/750802b55c6edda4d3bc78c41ad0a25a3450a557 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 23 18:08:33 2020 +0100 patch 8.2.0311: Vim9: insufficient script tests Problem: Vim9: insufficient script tests. Solution: Add tests. Free imports when re-using a script.
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Feb 2020 18: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