view src/which.sh @ 11951:e8b1ef40324a v8.0.0855

patch 8.0.0855: MS-Windows: can't get tty name of terminal commit https://github.com/vim/vim/commit/5be8dd087f36affa492ef6049fa813b376210543 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 3 20:52:19 2017 +0200 patch 8.0.0855: MS-Windows: can't get tty name of terminal Problem: MS-Windows: can't get tty name of terminal. Solution: Use the winpty process number. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/1929)
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Aug 2017 21:00: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