view src/which.sh @ 15985:e91750e8adb5 v8.1.0998

patch 8.1.0998: getcurpos() unexpectedly changes "curswant" commit https://github.com/vim/vim/commit/19a66858a5e3fedadc371321834507c34e2dfb18 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 7 11:25:32 2019 +0100 patch 8.1.0998: getcurpos() unexpectedly changes "curswant" Problem: getcurpos() unexpectedly changes "curswant". Solution: Save and restore "curswant". (closes https://github.com/vim/vim/issues/4069)
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Mar 2019 11:30:15 +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