view src/which.sh @ 24948:5c418c774f95 v8.2.3011

patch 8.2.3011: Vim9: cannot get argument values during debugging Commit: https://github.com/vim/vim/commit/6bc30b05e6081bcaece6d1a7fcfca238ea5a194f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 16 19:19:55 2021 +0200 patch 8.2.3011: Vim9: cannot get argument values during debugging Problem: Vim9: cannot get argument values during debugging. Solution: Lookup names in the list of arguments. Put debug instruction halfway for command.
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Jun 2021 19:30: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