view src/which.sh @ 19473:b09afbebffee v8.2.0294

patch 8.2.0294: cannot use Ex command that is also a function name Commit: https://github.com/vim/vim/commit/5b1c8fe3d588ab450d4646a0088db4efda88200a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 21 18:42:43 2020 +0100 patch 8.2.0294: cannot use Ex command that is also a function name Problem: Cannot use Ex command that is also a function name. Solution: Recognize an Ex command by a colon prefix.
author Bram Moolenaar <Bram@vim.org>
date Fri, 21 Feb 2020 18:45: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