view src/which.sh @ 28592:d3c966c0cdf7 v8.2.4820

patch 8.2.4820: not simple programmatic way to find a specific mapping Commit: https://github.com/vim/vim/commit/659c240cf769925ff432b88df8719e7ace4629b0 Author: Ernie Rael <errael@raelity.com> Date: Sun Apr 24 18:40:28 2022 +0100 patch 8.2.4820: not simple programmatic way to find a specific mapping Problem: Not simple programmatic way to find a specific mapping. Solution: Add getmappings(). (Ernie Rael, closes https://github.com/vim/vim/issues/10273)
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 Apr 2022 19:45:03 +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