view src/which.sh @ 10751:27b42717662b v8.0.0265

patch 8.0.0265: may get ml_get error when :pydo deletes lines commit https://github.com/vim/vim/commit/a58883b4ea0bbb813fd4dd7eb49dd6f03e3e5387 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 29 21:31:09 2017 +0100 patch 8.0.0265: may get ml_get error when :pydo deletes lines Problem: May get ml_get error when :pydo deletes lines or switches to another buffer. (Nikolai Pavlov, issue https://github.com/vim/vim/issues/1421) Solution: Check the buffer and line every time.
author Christian Brabandt <cb@256bit.org>
date Sun, 29 Jan 2017 21:45:04 +0100
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