view src/which.sh @ 30974:013f8436b0d5 v9.0.0822

patch 9.0.0822: crash when dragging the statusline with a mapping Commit: https://github.com/vim/vim/commit/8ab9ca93eea32b318235384720200771863ecaee Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 31 13:06:26 2022 +0000 patch 9.0.0822: crash when dragging the statusline with a mapping Problem: Crash when dragging the statusline with a mapping. Solution: Check for valid window pointer. (issue https://github.com/vim/vim/issues/11427)
author Bram Moolenaar <Bram@vim.org>
date Wed, 02 Nov 2022 11:18:52 +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