view src/which.sh @ 19069:e14feba578f1 v8.2.0095

patch 8.2.0095: cannot specify exit code for :cquit Commit: https://github.com/vim/vim/commit/1860bde9d31bbb0ba857f6284f6332a7134030dd Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 6 21:47:21 2020 +0100 patch 8.2.0095: cannot specify exit code for :cquit Problem: Cannot specify exit code for :cquit. Solution: Add optional argument. (Thinca, Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5442)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Jan 2020 22:00:06 +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