view src/which.sh @ 21556:963913d80284 v8.2.1328

patch 8.2.1328: no space allowed before comma in list Commit: https://github.com/vim/vim/commit/4d4d1cd5c8b61ef0296bd6190ca2a0b2d6d96ba7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 30 22:14:33 2020 +0200 patch 8.2.1328: no space allowed before comma in list Problem: No space allowed before comma in list. Solution: Legacy Vim script allows it. (closes https://github.com/vim/vim/issues/6577)
author Bram Moolenaar <Bram@vim.org>
date Thu, 30 Jul 2020 22:15:04 +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