view src/which.sh @ 20756:33a14786a0e4 v8.2.0930

patch 8.2.0930: script filetype detection trips over env -S argument Commit: https://github.com/vim/vim/commit/b5e18f29fac9253b0ccf1fde5e74bff72fa1ba60 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 7 21:58:54 2020 +0200 patch 8.2.0930: script filetype detection trips over env -S argument Problem: Script filetype detection trips over env -S argument. Solution: Remove "-S" and "--ignore-environment". (closes https://github.com/vim/vim/issues/5013) Add tests.
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Jun 2020 22:00:04 +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