We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71ca98 commit b657a1fCopy full SHA for b657a1f
1 file changed
Lib/sqlite3/__main__.py
@@ -133,11 +133,15 @@ def main(*args):
133
s = theme.syntax
134
135
if s.prompt:
136
+ # Use RL_PROMPT_START_IGNORE (\001) and RL_PROMPT_END_IGNORE (\002) to
137
+ # bracket non-printing characters. This tells readline to ignore them
138
+ # when calculating screen space for redisplay during history scrolling.
139
+ # See https://stackoverflow.com/a/9468954 for more details.
140
sys.ps1 = f"\001{s.prompt}\002sqlite> \001{s.reset}\002"
141
sys.ps2 = f"\001{s.prompt}\002 ... \001{s.reset}\002"
142
else:
- sys.ps1 = f"sqlite> "
- sys.ps2 = f" ... "
143
+ sys.ps1 = "sqlite> "
144
+ sys.ps2 = " ... "
145
146
con = sqlite3.connect(args.filename, isolation_level=None)
147
try:
0 commit comments