Any special significance to the "%s" ? 

Did not know this: ${FUNCNAME[0]}: 
nor  this: ${BASH_LINENO[0]}:
nor this: default="${2^^}"

Why do this:
printf -v prompt "$prompt" "[Y/n]" 
and not this:
prompt="${prompt} [Y/n]"

