docs: def confirm(text: str, default: bool = False) -> bool:
      """Display a confirmation prompt."""
      choices = "Y/n" if default else "y/N"
      prompt = f"{style(text, bold=True)} [{choices}]: "
      while 1:
          try:
              print(prompt, end="")
              value = input("").lower().strip()
          except (KeyboardInterrupt, EOFError):
              sys.exit(1)
          if value in ("y", "yes"):
              rv = True
          elif value in ("n", "no"):
              rv = False
          elif value == "":
              rv = default
          else:
              print_error("Error: invalid input")
              continue
          break
      return rv