view src/which.sh @ 20593:89b0f161e6a6 v8.2.0850

patch 8.2.0850: MS-Windows: exepath() works different from cmd.exe Commit: https://github.com/vim/vim/commit/95da136142628e06425f9d9eb2d1ca56a9e48feb Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 30 18:37:55 2020 +0200 patch 8.2.0850: MS-Windows: exepath() works different from cmd.exe Problem: MS-Windows: exepath() works different from cmd.exe. Solution: Make exepath() work better on MS-Windows. (closes https://github.com/vim/vim/issues/6115)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 May 2020 18:45: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