view src/which.sh @ 23654:1974c5122506 v8.2.2369

patch 8.2.2369: Vim9: functions return true/false but can't be used as bool Commit: https://github.com/vim/vim/commit/3af15ab7888033fdfae0ae7085172aab794339a2 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 16:16:23 2021 +0100 patch 8.2.2369: Vim9: functions return true/false but can't be used as bool Problem: Vim9: functions return true/false but can't be used as bool. Solution: Add ret_number_bool(). (closes https://github.com/vim/vim/issues/7693)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Jan 2021 16:30:05 +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