Skip to content

sqlite3 CLI does not recognize dot commands with trailing spaces #133439

Activity

added a commit that references this issue on May 5, 2025

picnixz commented on May 5, 2025

@picnixz
Member

Does the sqlite3 cli (not python one) ignore trailing whitespaces?

tanloong commented on May 5, 2025

@tanloong
ContributorAuthor

Yes. The sqlite3 cli works normally on sql statements with trailing or leading whitespaces.Image

tanloong commented on May 6, 2025

@tanloong
ContributorAuthor

Trailing whitespaces for dot commands are also ignored, although leading ones are not.

$ sqlite3↵
sqlite> .quit␣↵
$ 

$ sqlite3↵
sqlite> ␣.quit↵
    ... ↵
    ... ↵
added a commit that references this issue on May 9, 2025
added a commit that references this issue on May 9, 2025
added a commit that references this issue on May 9, 2025
added a commit that references this issue on May 9, 2025
added a commit that references this issue on May 9, 2025
added a commit that references this issue on Jun 13, 2025

serhiy-storchaka commented on Jun 13, 2025

@serhiy-storchaka
Member

There was a missed space and redundant newline in the error message. #133807 fixes this.

tanloong commented on Jun 14, 2025

@tanloong
ContributorAuthor

No, the missing space is not introduced here but from this line of #133461. I left a comment there a month ago but the comment was labeled as "Pending", I am not sure whether it was successfully sent and Stan received it or not. This PR uses self.write() in which the newline is needed, otherwise the output is mixed with the next shell prompt on the same line.

Image

encukou commented on Jun 16, 2025

@encukou
Member

@tanloong, the “pending” label means that the comment won't be sent until you “finish your review”:

Image

serhiy-storchaka commented on Jun 16, 2025

@serhiy-storchaka
Member

Ah, sorry. I thought you were the last one to touch this code.

It is a common error to add a comment but forget to publish it.

added a commit that references this issue on Jun 19, 2025
added a commit that references this issue on Jun 19, 2025
added a commit that references this issue on Jun 19, 2025
added 2 commits that reference this issue on Jul 12, 2025
added 2 commits that reference this issue on Aug 4, 2025
added a commit that references this issue on Aug 19, 2025
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/ directorytopic-sqlite3type-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions