view src/which.sh @ 31420:dcd73efec7de v9.0.1043

patch 9.0.1043: macro has confusing name and is duplicated Commit: https://github.com/vim/vim/commit/c51a376265708e49a46832816077b6dd27d12c0c Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Dec 10 10:22:29 2022 +0000 patch 9.0.1043: macro has confusing name and is duplicated Problem: Macro has confusing name and is duplicated. Solution: Use one macro with an understandable name. (closes https://github.com/vim/vim/issues/11686)
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Dec 2022 11:30:04 +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