view src/which.sh @ 20721:70d561931721 v8.2.0913

patch 8.2.0913: code for resetting v:register is duplicated Commit: https://github.com/vim/vim/commit/439c036ed062de1c87cc7e3fe050a9569fb12089 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 6 15:58:03 2020 +0200 patch 8.2.0913: code for resetting v:register is duplicated Problem: Code for resetting v:register is duplicated. Solution: Add reset_reg_var().
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Jun 2020 16: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