GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve `.help` in the `sqlite3` CLI · Issue #133934 · python/cpython

Improve .help in the sqlite3 CLI #133934

New issue
Copy link
New issue
Copy link
Closed
Closed
Improve .help in the sqlite3 CLI#133934
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement

Description

@tanloong
tanloong
opened on May 12, 2025
Issue body actions

Feature or enhancement

Proposal:

The .help command in the sqlite3 CLI does not give much information. It only shows a brief message:

sqlite> .help
Enter SQL code and press enter.

It would be better if .help displayed a list of available commands, and .help <command> showed detailed help for that specific command.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-133934: Improve .help in the sqlite3 CLI #133935
  • gh-133934: Improve sqlite3 .help message #135224

Activity

  1. tanloong
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 12, 2025
  2. ZeroIntensity
    added
    topic-sqlite3
    on May 12, 2025
  3. github-project-automation
    added this to sqlite3 issueson May 12, 2025
  4. picnixz
    added
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on May 15, 2025
  5. StanFromIreland commented on Jun 6, 2025

    @StanFromIreland
    StanFromIreland
    on Jun 6, 2025
    Member
    More actions

    We only need help for two commands, how about we hard-code it? I wrote a patch which can be seen below.

    Subject: [PATCH] Expand help
    ---
    Index: Lib/sqlite3/__main__.py
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    ===================================================================
    diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py
    --- a/Lib/sqlite3/__main__.py	(revision 0df15d0d4d55dcf7b7a7f4b2985bf84fd092d257)
    +++ b/Lib/sqlite3/__main__.py	(date 1749219376897)
    @@ -63,7 +63,10 @@
                     case "version":
                         print(f"{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"
    +                          f"{t.builtin}.version{t.reset}    Print the SQLite version\n"
    +                          f"{t.builtin}.quit{t.reset}       Exit the CLI, equivalent to CTRL-D\n")
                     case "quit":
                         sys.exit(0)
                     case "":

    What do you think @erlend-aasland of this approach?

    Reacted by Erlend E. Aasland
  6. erlend-aasland commented on Jun 6, 2025

    @erlend-aasland
    erlend-aasland
    on Jun 6, 2025
    Contributor
    More actions

    SGTM, Stan.

    Reacted by Stan Ulbrych
  7. encukou
    added a commit that references this issue on Jun 19, 2025

    gh-133934: Mention special commands in sqlite3 `.help` message (GH-13…

    13efe3f
  8. lkollar
    added a commit that references this issue on Jun 19, 2025

    pythongh-133934: Mention special commands in sqlite3 `.help` message (p…

    579db8d
  9. StanFromIreland
    closed this as completedon Jun 23, 2025
  10. github-project-automation
    moved this to Done in sqlite3 issueson Jun 23, 2025
  11. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-133934: Mention special commands in sqlite3 `.help` message (p…

    6c39092
  12. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-133934: Mention special commands in sqlite3 `.help` message (p…

    a7386c5
  13. Agent-Hellboy
    added a commit that references this issue on Aug 19, 2025

    pythongh-133934: Mention special commands in sqlite3 `.help` message (p…

    5fa22fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-sqlite3type-featureA feature request or enhancementA feature request or enhancement

    Projects

    • sqlite3 issues
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.