function ask {
	# Generic question asker
	# reply=$(ask [ [ []]])
	[ "${FDBG-}" ] && set -A fDbG $FDBG && [ $fDbG = set ] && eval $fDbG ${fDbG[1]}
	typeset echo askans valid
	[ "${1-}" = "-e" ] && { echo=n; shift; }
	while true; do
		print -u2 -n "${1-Reply}${2+ [}${2-}${2+]}: "
		[ ${echo-y} = n ] && stty -echo
		read askans
		[ ${echo-y} = n ] && stty echo
		[ "x${askans-}" = "xq" ] && return 2
		[ $# -le 1 ] && { echo "${askans-}"; return 0; }
		[ "x${askans-}" = "x" -a "$2" ] && { echo "$2"; return 0; }
		[ $# -eq 2 ] && { echo "${askans-}"; return 0; }
		set -A valid $*; valid[0]=""; valid[1]=""
		set -A valid ${valid[*]}
		valid[0]=" ${valid[*]} "
		[ "${valid% ${askans} *}" != "$valid" ] && {
			echo "${askans-}"; return 0
		} || {
			print -u2 "Reply must be one of $valid"
		}
	done
}