DISABLE FDs (REMOVE ME).
[jackhill/mal.git] / vimscript / run_vimscript.sh
CommitLineData
50a964ce
DM
1#!/bin/sh
2
3# Run Vim in ex mode (-e) and run the given script ($1) on startup. Our scripts
4# end with 'qall!' which causes actual Vim UI to never start up.
5#
6# Set environment variable DEBUG=1 to allow more verbose error output from Vim.
7#
8# See: http://vim.wikia.com/wiki/Vim_as_a_system_interpreter_for_vimscript
9
c9cf76dc
JM
10rundir=`dirname $0`
11export LD_LIBRARY_PATH=`readlink -f $rundir`
50a964ce
DM
12vimscriptfile="$1"
13shift
14if [ x$DEBUG = x ] ; then
15 exec 2> /dev/null
16fi
5f66fc06 17exec vim -i NONE -V1 -nNesS $vimscriptfile -- "$@" | cat