view src/which.sh @ 28873:c3570bdc93eb v8.2.4959

patch 8.2.4959: using NULL regexp program Commit: https://github.com/vim/vim/commit/b62dc5e7825bc195efe3041d5b3a9f1528359e1c Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 15 14:50:12 2022 +0100 patch 8.2.4959: using NULL regexp program Problem: Using NULL regexp program. Solution: Check for regexp program becoming NULL in more places.
author Bram Moolenaar <Bram@vim.org>
date Sun, 15 May 2022 16: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