view src/which.sh @ 26709:0c5daf5e5514 v8.2.3883

patch 8.2.3883: crash when switching to other regexp engine fails Commit: https://github.com/vim/vim/commit/5937c7505f444dd896f336fa0119a93a55ebe9a2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 16:46:14 2021 +0000 patch 8.2.3883: crash when switching to other regexp engine fails Problem: Crash when switching to other regexp engine fails. Solution: Check for regprog being NULL.
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 18:00: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