view src/which.sh @ 26897:d02d40f0261c v8.2.3977

patch 8.2.3977: error messages are spread out Commit: https://github.com/vim/vim/commit/9a846fbaa569b3690d70606f2a86e97f77a05496 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 1 21:59:18 2022 +0000 patch 8.2.3977: error messages are spread out Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jan 2022 23:00: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