view src/which.sh @ 22553:3ed3bed38e0f v8.2.1825

patch 8.2.1825: Vim9: accessing freed memory Commit: https://github.com/vim/vim/commit/d747548c664815bb6e8520afa90b6108e1997591 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 10 20:31:37 2020 +0200 patch 8.2.1825: Vim9: accessing freed memory Problem: Vim9: accessing freed memory. Solution: Clear sv_name when the variable is deleted.
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Oct 2020 20:45:04 +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