https://github.com/python/cpython/commit/13efe3f5993cb957fc0473a273dd7b02193e9e25
commit: 13efe3f5993cb957fc0473a273dd7b02193e9e25
branch: main
author: Stan Ulbrych <89152624+stanfromirel...@users.noreply.github.com>
committer: encukou <encu...@gmail.com>
date: 2025-06-19T13:47:29+02:00
summary:

gh-133934: Mention special commands in sqlite3 `.help` message (GH-135224)

files:
A Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst
M Lib/sqlite3/__main__.py

diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py
index 9443afbfcc273f..35344ecceff526 100644
--- a/Lib/sqlite3/__main__.py
+++ b/Lib/sqlite3/__main__.py
@@ -65,7 +65,11 @@ def runsource(self, source, filename="<input>", 
symbol="single"):
                 case "version":
                     print(sqlite3.sqlite_version)
                 case "help":
-                    print("Enter SQL code and press enter.")
+                    t = theme.syntax
+                    print(f"Enter SQL code or one of the below commands, and 
press enter.\n\n"
+                          f"{t.builtin}.version{t.reset}    Print underlying 
SQLite library version\n"
+                          f"{t.builtin}.help{t.reset}       Print this help 
message\n"
+                          f"{t.builtin}.quit{t.reset}       Exit the CLI, 
equivalent to CTRL-D\n")
                 case "quit":
                     sys.exit(0)
                 case "":
diff --git 
a/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst 
b/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst
new file mode 100644
index 00000000000000..4de7b4cceca977
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-06-06-17-34-18.gh-issue-133934.yT1r68.rst
@@ -0,0 +1 @@
+Improve :mod:`sqlite3` CLI's ``.help`` message.

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to