diff --git a/rich/prompt.py b/rich/prompt.py index c7cf25bae..3eeecc00c 100644 --- a/rich/prompt.py +++ b/rich/prompt.py @@ -1,3 +1,4 @@ +import sys from typing import Any, Generic, List, Optional, TextIO, TypeVar, Union, overload from . import get_console @@ -290,6 +291,9 @@ def __call__(self, *, default: Any = ..., stream: Optional[TextIO] = None) -> An self.pre_prompt() prompt = self.make_prompt(default) value = self.get_input(self.console, prompt, self.password, stream=stream) + if ("readline" in sys.modules) and (value == ""): + + print("") if value == "" and default != ...: return default try: