view src/which.sh @ 16413:4734d601ebdd v8.1.1211

patch 8.1.1211: not all user command code is tested commit https://github.com/vim/vim/commit/e61e548dd6a20471fd81160b1c2a16089505ec8c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 27 15:05:12 2019 +0200 patch 8.1.1211: not all user command code is tested Problem: Not all user command code is tested. Solution: Add more tests.
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Apr 2019 15:15:07 +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