sread() {
  printf '%s: ' "$2"

  # Disable terminal printing while the user inputs their
  # password. POSIX 'read' has no '-s' flag which would
  # effectively do the same thing.
  [ -t 0 ] && stty -echo
  read -r "$1"
  [ -t 0 ] && stty echo

  printf '\n'
}
# sread pass "enter a password"
# [ "${pass}" ] ||
#     die "password can't be empty"
# sread pass2 "enter a password (again)"
