view src/which.sh @ 24490:08050e45bd06 v8.2.2785

patch 8.2.2785: Vim9: cannot redirect to local variable Commit: https://github.com/vim/vim/commit/2d1c57ed3dd25c44b41b9ddd4cf63c01ae89007e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 19 20:50:03 2021 +0200 patch 8.2.2785: Vim9: cannot redirect to local variable Problem: Vim9: cannot redirect to local variable. Solution: Compile :redir when redirecting to a variable.
author Bram Moolenaar <Bram@vim.org>
date Mon, 19 Apr 2021 21: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