Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-27 18:56:46 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-01-27 18:56:46 +0300
commitc9480f99433a660942cbd8a739d989cb69fedc36 (patch)
treea5861ecf723184f5a7e6e89ba14433867f2d5e4f /sphinx/cmd
parent2ee0338388a54e976c3776c116cdc1080fb62c53 (diff)
parent62dad2f13331d15d94b36b8f125f08fd4304b68b (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/cmd')
-rw-r--r--sphinx/cmd/quickstart.py6
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