view src/which.sh @ 28612:352806724e12 v8.2.4830

patch 8.2.4830: possible endless loop if there is unused typahead Commit: https://github.com/vim/vim/commit/23f106efeb64eadd95adee34144f64526aa5f61f Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 26 18:52:22 2022 +0100 patch 8.2.4830: possible endless loop if there is unused typahead Problem: Possible endless loop if there is unused typahead. Solution: Only loop when the typeahead changed.
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Apr 2022 20:00:04 +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