view src/which.sh @ 15081:0d2138d4c1dc v8.1.0551

patch 8.1.0551: expression evaluation may repeat an error message commit https://github.com/vim/vim/commit/8ff5af9544a2abc3d344bba017ef96682e098d9d Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 28 21:20:38 2018 +0100 patch 8.1.0551: expression evaluation may repeat an error message Problem: Expression evaluation may repeat an error message. (Jason Franklin) Solution: Check for the value of did_emsg when giving an error for the :execute command.
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Nov 2018 21:30:04 +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