Merging upstream version 1.11.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
afb6b84281
commit
a481b8c5e0
8 changed files with 33 additions and 15 deletions
|
@ -10,7 +10,7 @@ from time import time
|
|||
from datetime import datetime
|
||||
from io import open
|
||||
from collections import namedtuple
|
||||
from sqlite3 import OperationalError
|
||||
from sqlite3 import OperationalError, sqlite_version
|
||||
import shutil
|
||||
|
||||
from cli_helpers.tabular_output import TabularOutputFormatter
|
||||
|
@ -380,10 +380,8 @@ class LiteCli(object):
|
|||
key_bindings = cli_bindings(self)
|
||||
|
||||
if not self.less_chatty:
|
||||
print("Version:", __version__)
|
||||
print("Mail: https://groups.google.com/forum/#!forum/litecli-users")
|
||||
print(f"LiteCli: {__version__} (SQLite: {sqlite_version})")
|
||||
print("GitHub: https://github.com/dbcli/litecli")
|
||||
# print("Home: https://litecli.com")
|
||||
|
||||
def get_message():
|
||||
prompt = self.get_prompt(self.prompt_format)
|
||||
|
@ -588,7 +586,11 @@ class LiteCli(object):
|
|||
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:
|
||||
|
@ -819,7 +821,7 @@ class LiteCli(object):
|
|||
headers,
|
||||
format_name="vertical" if expanded else None,
|
||||
column_types=column_types,
|
||||
**output_kwargs
|
||||
**output_kwargs,
|
||||
)
|
||||
|
||||
if isinstance(formatted, (text_type)):
|
||||
|
@ -841,7 +843,7 @@ class LiteCli(object):
|
|||
headers,
|
||||
format_name="vertical",
|
||||
column_types=column_types,
|
||||
**output_kwargs
|
||||
**output_kwargs,
|
||||
)
|
||||
if isinstance(formatted, (text_type)):
|
||||
formatted = iter(formatted.splitlines())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue