view src/which.sh @ 26817:a8ded20a59e6 v8.2.3937

patch 8.2.3937: Insert mode completion function is too long Commit: https://github.com/vim/vim/commit/edc6f103907a004b9e2265e232dc8be8bc594601 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Wed Dec 29 17:38:46 2021 +0000 patch 8.2.3937: Insert mode completion function is too long Problem: Insert mode completion function is too long. Solution: Refactor into multiple functions. (Yegappan Lakshmanan, closes #9423)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Dec 2021 18:45:03 +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