view src/which.sh @ 19675:bee179e81f28 v8.2.0394

patch 8.2.0394: Coverity complains about using NULL pointer Commit: https://github.com/vim/vim/commit/7f009dfa064240d9024b76212535a35231912511 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 16 20:27:38 2020 +0100 patch 8.2.0394: Coverity complains about using NULL pointer Problem: Coverity complains about using NULL pointer. Solution: Use empty string when option value is NULL.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Mar 2020 20:30:04 +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