view src/which.sh @ 11925:fe6675d67a10 v8.0.0842

patch 8.0.0842: using slave pty after closing it commit https://github.com/vim/vim/commit/223896d3e9d4d511fc38fd9ee27ba16318733df6 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 2 22:33:28 2017 +0200 patch 8.0.0842: using slave pty after closing it Problem: Using slave pty after closing it. Solution: Do the ioctl() before dup'ing it.
author Christian Brabandt <cb@256bit.org>
date Wed, 02 Aug 2017 22: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