view src/which.sh @ 25280:ca7a8ea2eb5f v8.2.3177

patch 8.2.3177: Vim9: can not use "for _ in expr" at script level Commit: https://github.com/vim/vim/commit/ad2d4969e1616d3a0354c181e3a09271d5433b3d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 18 17:08:50 2021 +0200 patch 8.2.3177: Vim9: can not use "for _ in expr" at script level Problem: Vim9: can not use "for _ in expr" at script level. Solution: Skip assignment if the loop variable is "_".
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Jul 2021 17:15: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