view src/which.sh @ 16511:4182f74e2965 v8.1.1259

patch 8.1.1259: crash when exiting early commit https://github.com/vim/vim/commit/e5c83286bb9a72cc686f2826e605eddebe3c730c Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 3 23:15:37 2019 +0200 patch 8.1.1259: crash when exiting early Problem: Crash when exiting early. (Ralf Schandl) Solution: Only pop/push the title when it was set. (closes https://github.com/vim/vim/issues/4334)
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 May 2019 23:30: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