view src/which.sh @ 11977:701aea3bc68b v8.0.0869

patch 8.0.0869: job output is sometimes not displayed in a terminal commit https://github.com/vim/vim/commit/a9f028103fee253ea8a09e49031011ee3da69ece Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 5 17:40:38 2017 +0200 patch 8.0.0869: job output is sometimes not displayed in a terminal Problem: Job output is sometimes not displayed in a terminal. Solution: Flush output before closing the channel.
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Aug 2017 17:45:03 +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