view src/which.sh @ 19908:473ceb7f65e2 v8.2.0510

patch 8.2.0510: Coverity complains about using uninitialized variable Commit: https://github.com/vim/vim/commit/8d4ed11da635a1abe0ef2d795b4d48824c54d0e7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 4 14:50:32 2020 +0200 patch 8.2.0510: Coverity complains about using uninitialized variable Problem: Coverity complains about using uninitialized variable. Solution: Assign a value to "scol". Move code inside NULL check.
author Bram Moolenaar <Bram@vim.org>
date Sat, 04 Apr 2020 15:00: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