view src/which.sh @ 28455:8f4f16efeeb3 v8.2.4752

patch 8.2.4752: wrong 'statusline' value can cause illegal memory access Commit: https://github.com/vim/vim/commit/5dc294a7b63ed0e508dd360bc4d98173f1a1aeec Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Apr 15 13:17:57 2022 +0100 patch 8.2.4752: wrong 'statusline' value can cause illegal memory access Problem: Wrong 'statusline' value can cause illegal memory access. Solution: Properly check the value. (closes https://github.com/vim/vim/issues/10192)
author Bram Moolenaar <Bram@vim.org>
date Fri, 15 Apr 2022 14:30: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