view src/which.sh @ 23555:0f7bb6f706f0 v8.2.2320

patch 8.2.2320: Vim9: no error for comparing bool with string Commit: https://github.com/vim/vim/commit/cff40ff98664f4f5a9631aff1a155caf762ea74b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 9 16:21:37 2021 +0100 patch 8.2.2320: Vim9: no error for comparing bool with string Problem: Vim9: no error for comparing bool with string. Solution: Check for wrong types when comparing. (closes https://github.com/vim/vim/issues/7639)
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Jan 2021 16:30: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