aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/sqlite3/__main__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sqlite3/__main__.py')
-rw-r--r--Lib/sqlite3/__main__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py
index 9e74b49ee82..35344ecceff 100644
--- a/Lib/sqlite3/__main__.py
+++ b/Lib/sqlite3/__main__.py
@@ -63,17 +63,21 @@ class SqliteInteractiveConsole(InteractiveConsole):
if source[0] == ".":
match source[1:].strip():
case "version":
- print(f"{sqlite3.sqlite_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 "":
pass
case _ as unknown:
t = theme.traceback
- self.write(f'{t.type}Error{t.reset}:{t.message} unknown'
- f'command or invalid arguments: "{unknown}".\n{t.reset}')
+ self.write(f'{t.type}Error{t.reset}: {t.message}unknown '
+ f'command: "{unknown}"{t.reset}\n')
else:
if not sqlite3.complete_statement(source):
return True