view src/which.sh @ 21038:6ad5f0c99ee9 v8.2.1070

patch 8.2.1070: Vim9: leaking memory when lacking white space in dict Commit: https://github.com/vim/vim/commit/ab19d495fd880b25a38d58cbeb5b21e4d0ee5835 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 27 17:04:05 2020 +0200 patch 8.2.1070: Vim9: leaking memory when lacking white space in dict Problem: Vim9: leaking memory when lacking white space in dict. Solution: Clear the typval.
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Jun 2020 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