view src/which.sh @ 32136:50e447c67247 v9.0.1399

patch 9.0.1399: highlight test script has a few problems Commit: https://github.com/vim/vim/commit/4df0772a41c361a1c40d220f6fad0b1e1653fc5b Author: lagygoill <lacygoill@lacygoill.me> Date: Fri Mar 10 18:37:11 2023 +0000 patch 9.0.1399: highlight test script has a few problems Problem: Highlight test script has a few problems. Solution: Rewrite the script in Vim9 syntax. (closes https://github.com/vim/vim/issues/10379)
author Bram Moolenaar <Bram@vim.org>
date Fri, 10 Mar 2023 19:45:05 +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