gh-109151: Enable readline in the sqlite3 CLI (GH-109152)

This commit is contained in:
Serhiy Storchaka 2023-10-04 14:16:44 +03:00 committed by GitHub
parent e9f2352b7b
commit 254e30c487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,10 @@ def main(*args):
else:
# No SQL provided; start the REPL.
console = SqliteInteractiveConsole(con)
try:
import readline
except ImportError:
pass
console.interact(banner, exitmsg="")
finally:
con.close()

View File

@ -0,0 +1 @@
Enable ``readline`` editing features in the :ref:`sqlite3 command-line interface <sqlite3-cli>` (``python -m sqlite3``).