view src/which.sh @ 27782:40ae50de0d27 v8.2.4417

patch 8.2.4417: using NULL pointer Commit: https://github.com/vim/vim/commit/e89bfd212b21c227f026e467f882c62cdd6e642d Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 18 18:34:45 2022 +0000 patch 8.2.4417: using NULL pointer Problem: Using NULL pointer. Solution: Set offset after checking for NULL pointer.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Feb 2022 19:45:03 +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