Closed gvoysey closed 2 months ago
That is quite the embarrassing bug. Thanks for reporting it. Looking into it now.
if it's any consolation, i accidentally loop over the characters of a string instead of strings in a list at least once a quarter!
I've released a new version with the bug fix. Thanks again for reporting.
thanks for the super fast reply! I found this while figuring out how to auto-load spatialite ( ref #127 ) -- which also works. Much nicer than futzing around waiting for datagrip to fire up.
On Fri, May 3, 2024 at 1:35 PM Amjith Ramanujam @.***> wrote:
I've released a new version with the bug fix. Thanks again for reporting.
— Reply to this email directly, view it on GitHub https://github.com/dbcli/litecli/issues/176#issuecomment-2093473798, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3ZD32J3CVH7T2SVNYSJK3ZAPDEXAVCNFSM6AAAAABHFRUIX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJTGQ3TGNZZHA . You are receiving this because you authored the thread.Message ID: @.***>
Using litecli version 1.10.1, installed with pipx on linux; base python is a pyenv-installed 3.10.10.
Given the following contents of
~/.config/litecli/config
:loading litecli fails:
If the config is changed to add a trailing comma:
then the
.tables
command is correctly executed.I suspect this is because without the comma, python is iterating the over the string
".tables"
, not the list[".tables",]
: https://github.com/dbcli/litecli/blob/9d5bcf0ba17fd0562309164175d7db1a54f85464/litecli/main.py#L591-L596Adding a print above L592 confirms.
Without a comma:
self.startup_commands={'commands': '.tables'}
With a comma:
self.startup_commands={'commands': ['.tables']}