view src/which.sh @ 16726:fbab59a5ee6b v8.1.1365

patch 8.1.1365: source command doesn't check for the sandbox commit https://github.com/vim/vim/commit/53575521406739cf20bbe4e384d88e7dca11f040 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 22 22:38:25 2019 +0200 patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
author Bram Moolenaar <Bram@vim.org>
date Wed, 22 May 2019 22:45:05 +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