view src/which.sh @ 22760:d235c5fa0bbe v8.2.1928

patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong Commit: https://github.com/vim/vim/commit/cd030c4b604bea92311e9c418aefe5143dee9201 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 30 21:49:40 2020 +0100 patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong Problem: Vim9: "silent!" not effective when list index is wrong. Solution: Ignore list indes failure when emsg_silent is set. (closes https://github.com/vim/vim/issues/7232)
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Oct 2020 22: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