view src/which.sh @ 20919:96bf2b304932 v8.2.1011

patch 8.2.1011: Vim9: some code not tested Commit: https://github.com/vim/vim/commit/c785b9a7f471f12825a1d6d2041c144c74242b7c Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 19 18:34:15 2020 +0200 patch 8.2.1011: Vim9: some code not tested Problem: Vim9: some code not tested. Solution: Add a few more test cases. Reorder checks for clearer error. Remove unreachable code.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jun 2020 18:45: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