Skip to content

gh-153768: Fix sqlite3 CLI completion for database names with quotes#153770

Open
lkk7 wants to merge 1 commit into
python:mainfrom
lkk7:fix-sqlite-completer-quotes
Open

gh-153768: Fix sqlite3 CLI completion for database names with quotes#153770
lkk7 wants to merge 1 commit into
python:mainfrom
lkk7:fix-sqlite-completer-quotes

Conversation

@lkk7

@lkk7 lkk7 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #153768

Attached database names can contain " or ' quotes, and it breaks table completion.
Escape schema names as SQL identifiers or string literals, and add tests for both cases.

'\x1b[35mnear "sel": syntax error\x1b[0m', err)


class Completer(unittest.TestCase):

@lkk7 lkk7 Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a new test class because the existing class below is a bit too "end-to-end", while those tests just test the _complete function.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlite3 completion fail on attached names with quotes

1 participant