mirror of https://github.com/python/cpython
gh-102628: Fix sqlite3 CLI prompt for Windows console users (#103898)
The prompt will still be incorrect in IDLE on Windows, as IDLE uses CTRL-D for EOF on all platforms.
This commit is contained in:
parent
44b5c21f41
commit
8def5ef016
|
@ -94,12 +94,13 @@ def main():
|
|||
db_name = repr(args.filename)
|
||||
|
||||
# Prepare REPL banner and prompts.
|
||||
eofkey = "CTRL-Z" if sys.platform == "win32" else "CTRL-D"
|
||||
banner = dedent(f"""
|
||||
sqlite3 shell, running on SQLite version {sqlite3.sqlite_version}
|
||||
Connected to {db_name}
|
||||
|
||||
Each command will be run using execute() on the cursor.
|
||||
Type ".help" for more information; type ".quit" or CTRL-D to quit.
|
||||
Type ".help" for more information; type ".quit" or {eofkey} to quit.
|
||||
""").strip()
|
||||
sys.ps1 = "sqlite> "
|
||||
sys.ps2 = " ... "
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Substitute CTRL-D with CTRL-Z in :mod:`sqlite3` CLI banner when running on
|
||||
Windows.
|
Loading…
Reference in New Issue