#!/bin/sh
export ROOT1
ROOT1="$1"
export ROOT2
ROOT2="$2"
opts='diff scrollbind cursorbind scrollopt+=hor nowrap fdm=diff readonly nomodified buftype=nofile bufhidden=delete'
exec vim \
	+'0r!ROOT="$ROOT1" fslist' \
	+"setlocal $opts" \
	+"exe 'file '.\$ROOT1.'.fs'" \
	+'rightb vnew' \
	+'0r!ROOT="$ROOT2" fslist' \
	+"setlocal $opts" \
	+"exe 'file '.\$ROOT2.'.fs'" \
	+'norm ggzM'
#exec vim \
#	+'0r!ROOT="$ROOT1" fslist2 .' \
#	+"setlocal $opts" \
#	+"exe 'file '.\$ROOT1.'.fs'" \
#	+'rightb vnew' \
#	+'0r!ROOT="$ROOT2" fslist2 .' \
#	+"setlocal $opts" \
#	+"exe 'file '.\$ROOT2.'.fs'" \
#	+'norm ggzM'