view src/which.sh @ 28222:85540173d3ca v8.2.4637

patch 8.2.4637: warning for using uninitialized variable Commit: https://github.com/vim/vim/commit/565d1278cbbb7bc927bee207d5c2bc0bb95928fa Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 27 18:11:05 2022 +0100 patch 8.2.4637: warning for using uninitialized variable Problem: Warning for using uninitialized variable. (Tony Mechelynck) Solution: Initialize it.
author Bram Moolenaar <Bram@vim.org>
date Sun, 27 Mar 2022 19: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