view src/which.sh @ 5720:0ace3a24c2a0 v7.4.205

updated for version 7.4.205 Problem: ":mksession" writes command to move to second argument while it does not exist. When it does exist the order might be wrong. Solution: Use ":argadd" for each argument instead of using ":args" with a list of names. (Nobuhiro Takasaki)
author Bram Moolenaar <bram@vim.org>
date Wed, 12 Mar 2014 21:28:26 +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