view src/which.sh @ 12539:6d3584b60170 v8.0.1148

patch 8.0.1148: gN doesn't work on last match with 'wrapscan' off commit https://github.com/vim/vim/commit/22ab547dc281092d6a9d397db712a11733c38e97 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 26 12:28:45 2017 +0200 patch 8.0.1148: gN doesn't work on last match with 'wrapscan' off Problem: "gN" doesn't work on last match with 'wrapscan' off. (fcpg) Solution: Adjust for searching backward. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 26 Sep 2017 12:30:03 +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