view src/which.sh @ 17696:03dcb660c4e8 v8.1.1845

patch 8.1.1845: may use NULL pointer when running out of memory commit https://github.com/vim/vim/commit/6ace95e9810bdfef5392ad89efc9e4ad4606de28 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 13 23:09:49 2019 +0200 patch 8.1.1845: may use NULL pointer when running out of memory Problem: May use NULL pointer when running out of memory. Solution: Do not clear popup buffers when NULL. (closes https://github.com/vim/vim/issues/4802)
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Aug 2019 23:15:05 +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