#!/usr/bin/zsh

function zsh_clear_env () {
	for V in `set +`; do
		case "$V" in
			'!'|'$'|'*'|'@'|'?'|'-'|'#'|[0-9]|V)
				;;
			**)
				typeset +r "$V"
				unset "$V"
				;;
		esac
	done
	unset V
	emulate zsh
}

zsh_clear_env
# ...
