view src/which.sh @ 10118:5d77565e6222 v7.4.2330

commit https://github.com/vim/vim/commit/030cddc7ec0c3d2fe3969140cd1b92b2f18633c0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 4 23:41:42 2016 +0200 patch 7.4.2330 Problem: Coverity complains about not checking curwin to be NULL. Solution: Use firstwin to avoid the warning.
author Christian Brabandt <cb@256bit.org>
date Sun, 04 Sep 2016 23:45: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