sel() {
	[ "${FDBG-}" ] && set -A fDbG $FDBG && [ $fDbG = set ] && eval $fDbG ${fDbG[1]}
	# These names cannot be used as the array names as they ar replaced
	typeset Reserved=" Reserved ITEMS item i j "
	[ "${Reserved% $1 *}" = "$Reserved" ] || {
		print -u2 "Program error.  $1 is reserved"; exit; }
	typeset ITEMS item
	typeset -i i=0 j
	j=$(eval echo '${#'$1'[*]}')
	eval $(echo set -A ITEMS Quit '"${'${1}'[@]}"')
	k=$(($j - 1))
	j=$(($j + 1))
	[ "${-%x*}" = "$-" ] && clear > /dev/tty 2>&1
	[ "$title" -o "$depth" ] &&
		print -u2 "${depth+(}${depth-}${depth+) -> }${title-}"
	#[ "$title" ] && print -u2 "$title"
	typeset rpy="" i=0
	select ITEM in "${ITEMS[@]}"; do
		case "$REPLY" in
		1|[Qq])		echo "exit"; return 1 ;;
		!!)		exec $this $args ;;
		!set)		set 1>&2 ;;
		[+-][xv])
				set "$REPLY"
				echo "export FDBG=\"set $REPLY\";"
				;;
		[Bb])
			[ "${ITEMS[0]}" = Back ] && echo "idx=0" && return ;;
		[2-9]|[1-9][0-9])
			[ "$REPLY" -le $j ] &&
			echo "idx=$(($REPLY - 2))" && return ;;
		*)
			i=0
			until [ "${ITEMS[$i]}" = "$REPLY" -o $i -gt $k ]; do
				i=$(($i + 1))
			done
			[ $i -le $k ] && echo "idx=$i" && break
		;;
	esac
	done
	return 0
}