view src/which.sh @ 29030:f79cff615e69 v8.2.5037

patch 8.2.5037: cursor position may be invalid after "0;" range Commit: https://github.com/vim/vim/commit/4d97a565ae8be0d4debba04ebd2ac3e75a0c8010 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 28 14:25:35 2022 +0100 patch 8.2.5037: cursor position may be invalid after "0;" range Problem: Cursor position may be invalid after "0;" range. Solution: Check the cursor position when it was set by ";" in the range.
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 May 2022 15: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