view src/which.sh @ 30465:b3367a7a3914 v9.0.0568

patch 9.0.0568: autocmd code is indented more than needed Commit: https://github.com/vim/vim/commit/e9dcf13a3007d4f603e007e0526b0005fd026bc5 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Sep 24 11:30:41 2022 +0100 patch 9.0.0568: autocmd code is indented more than needed Problem: Autocmd code is indented more than needed. Solution: Break out sooner. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/11208) Also in user function code.
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Sep 2022 12:45:03 +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