Skip to content

Commit

Permalink
Merge branch 'main' into random-stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
amjith committed May 3, 2024
2 parents 4c545ae + 02718a6 commit 95eee73
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
## 1.11.0 - TBD
## Upcoming - TBD

### Improvements

* When an empty `\d` is invoked the list of tables are returned instead of an error.
* Show SQLite version at startup.


### Bug Fixes

* Support a single item in the startup commands in the config. (bug #176)


## 1.10.1 - 2024-3-23

Expand Down
4 changes: 2 additions & 2 deletions litecli/liteclirc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ output.even-row = ""

# Startup commands
# litecli commands or sqlite commands to be executed on startup.
# some of them will require you to have a database attached.
# some of them will require you to have a database attached.
# they will be executed in the same order as they appear in the list.
[startup_commands]
#commands = ".tables", "pragma foreign_keys = ON;"
#commands = ".tables", "pragma foreign_keys = ON;"
6 changes: 5 additions & 1 deletion litecli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ def one_iteration(text=None):
def startup_commands():
if self.startup_commands:
if "commands" in self.startup_commands:
for command in self.startup_commands["commands"]:
if isinstance(self.startup_commands["commands"], str):
commands = [self.startup_commands["commands"]]
else:
commands = self.startup_commands["commands"]
for command in commands:
try:
res = sqlexecute.run(command)
except Exception as e:
Expand Down

0 comments on commit 95eee73

Please sign in to comment.