view src/which.sh @ 32002:879456b2022b v9.0.1333

patch 9.0.1333: when redo'ing twice <ScriptCmd> may not get the script ID Commit: https://github.com/vim/vim/commit/6b066c6d8f57aa05f1ab29ab4d098bc4bfabb1bb Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 20 18:44:33 2023 +0000 patch 9.0.1333: when redo'ing twice <ScriptCmd> may not get the script ID Problem: When redo'ing twice <ScriptCmd> may not get the script ID. Solution: When "last_used_map" map is not set use "last_used_sid". (closes #11930)
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 Feb 2023 19:45: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