view src/which.sh @ 27714:072c7ae27b06 v8.2.4383

patch 8.2.4383: Vim9: unused code lines Commit: https://github.com/vim/vim/commit/7a3b802bab5add34baae37ec2c1ae7ad2f1693bd Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 14 19:53:03 2022 +0000 patch 8.2.4383: Vim9: unused code lines Problem: Vim9: unused code lines. Solution: Rely on either "cctx" or "cstack" to not be NULL.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Feb 2022 21:00:03 +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