view src/which.sh @ 21058:111f877e63d9 v8.2.1080

patch 8.2.1080: Vim9: no line break allowed in a for loop Commit: https://github.com/vim/vim/commit/b7a78f7a6713f07d2fcad0b27dea22925c7b1cdf Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 28 18:43:40 2020 +0200 patch 8.2.1080: Vim9: no line break allowed in a for loop Problem: Vim9: no line break allowed in a for loop. Solution: Skip line breaks in for command.
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Jun 2020 18:45: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