#! /bin/sh
EXINIT0="set  autodetect=cn fileencoding=iso-2022-cn displayencoding=iso-2022-cn inputencoding=iso-2022-cn noskipdisplay"
if [ -f ~/.exrc ]; then
	EXINIT="$EXINIT0 `sed -e '/^set /!d' -e 's/^set //' < ~/.exrc | tr '\012' ' '`"
else
	EXINIT=$EXINIT0
fi
export EXINIT
exec /usr/local/bin/nvi "$@"
