diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-27 18:56:46 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-27 18:56:46 +0300 |
commit | c9480f99433a660942cbd8a739d989cb69fedc36 (patch) | |
tree | a5861ecf723184f5a7e6e89ba14433867f2d5e4f /sphinx/cmd | |
parent | 2ee0338388a54e976c3776c116cdc1080fb62c53 (diff) | |
parent | 62dad2f13331d15d94b36b8f125f08fd4304b68b (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/cmd')
-rw-r--r-- | sphinx/cmd/quickstart.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 0972769ee..4ef9335a4 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -27,6 +27,7 @@ try: readline.parse_and_bind("tab: complete") USE_LIBEDIT = False except ImportError: + readline = None USE_LIBEDIT = False from docutils.utils import column_width @@ -139,8 +140,11 @@ def do_prompt(text: str, default: str = None, validator: Callable[[str], Any] = # sequence (see #5335). To avoid the problem, all prompts are not colored # on libedit. pass - else: + elif readline: + # pass input_mode=True if readline available prompt = colorize(COLOR_QUESTION, prompt, input_mode=True) + else: + prompt = colorize(COLOR_QUESTION, prompt, input_mode=False) x = term_input(prompt).strip() if default and not x: x = default |