mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
2 changed files with 4 additions and 1 deletions
|
@ -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 = " ... "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue