Skip to content

Allow comma-containing init-commands in ~/.myclirc - #2341

Merged
rolandwalker merged 1 commit into
mainfrom
RW/allow-comma-containing-init-commands
Oct 7, 2026
Merged

rolandwalker merged 1 commit into
mainfrom
RW/allow-comma-containing-init-commands

Conversation

@rolandwalker

Copy link
Copy Markdown
Contributor

Description

Generalize FavoriteQueryPreservingConfigObj's _parse() to cover all config file stanzas with SQL values:

  • favorite_queries
  • init-commands
  • alias_dsn.init-commands

And use a new class name SQLValuePreservingConfigObj.

Incidentally update the known_bugs.md with an explanation of the limitation on saving favorite_queries with internal triplequotes. Though the same issue exists on read of unquoted init-commands, it is harder to explain, and left out of the known_bugs.md entry.

xref #2340

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the mycli/AUTHORS.txt file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

Generalize FavoriteQueryPreservingConfigObj's _parse() to cover all
config file stanzas with SQL values:

 * favorite_queries
 * init-commands
 * alias_dsn.init-commands

And use a new class name SQLValuePreservingConfigObj.

Incidentally update the known_bugs.md with an explanation of the
limitation on saving favorite_queries with internal triplequotes.
Though the same issue exists on read of unquoted init-commands, it
is harder to explain, and left out of the known_bugs.md entry.
@rolandwalker rolandwalker self-assigned this Oct 7, 2026
@rolandwalker
rolandwalker merged commit 34fd3cd into main Oct 7, 2026
12 checks passed
@rolandwalker
rolandwalker deleted the RW/allow-comma-containing-init-commands branch October 7, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant