view src/which.sh @ 23660:f8f460738aaa v8.2.2372

patch 8.2.2372: confusing error message for wrong :let command Commit: https://github.com/vim/vim/commit/585587dadbc2558520c33969098db9ff49598785 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 20:52:13 2021 +0100 patch 8.2.2372: confusing error message for wrong :let command Problem: Confusing error message for wrong :let command. Solution: Only check for type in Vim9 script.
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Jan 2021 21:00:04 +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