diff options
-rw-r--r-- | .pre-commit-config.yaml | 5 | ||||
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | litecli/AUTHORS | 1 | ||||
-rw-r--r-- | litecli/__init__.py | 2 | ||||
-rw-r--r-- | litecli/liteclirc | 3 | ||||
-rw-r--r-- | litecli/main.py | 3 | ||||
-rwxr-xr-x | setup.py | 2 | ||||
-rw-r--r-- | tests/test_sqlexecute.py | 6 |
9 files changed, 20 insertions, 9 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be3886f..4f53bac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,5 @@ repos: -- repo: https://github.com/ambv/black - rev: 20.8b1 +- repo: https://github.com/psf/black + rev: 21.12b0 hooks: - id: black - language_version: python3.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index d170c9a..58c9926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ -## Unreleased - TBD +## 1.7.0 - 2022-01-11 ### Features +* Add config option show_bottom_toolbar. + ### Bug Fixes +* Pin pygments version to prevent breaking change. ## 1.6.0 - 2021-03-15 @@ -47,7 +47,7 @@ Examples: - litecli sqlite_db_name ``` -A config file is automatically created at `~/.config/litecli/config` at first launch. See the file itself for a description of all available options. +A config file is automatically created at `~/.config/litecli/config` at first launch. For Windows machines a config file is created at `~\AppData\Local\dbcli\litecli\config` at first launch. See the file itself for a description of all available options. ## Docs diff --git a/litecli/AUTHORS b/litecli/AUTHORS index d5265de..194cdc7 100644 --- a/litecli/AUTHORS +++ b/litecli/AUTHORS @@ -18,3 +18,4 @@ Contributors: * Zhaolong Zhu * Zhiming Wang * Shawn M. Chapla + * Paweł Sacawa diff --git a/litecli/__init__.py b/litecli/__init__.py index e4adfb8..14d9d2f 100644 --- a/litecli/__init__.py +++ b/litecli/__init__.py @@ -1 +1 @@ -__version__ = "1.6.0" +__version__ = "1.7.0" diff --git a/litecli/liteclirc b/litecli/liteclirc index 5bfffbd..f0a4285 100644 --- a/litecli/liteclirc +++ b/litecli/liteclirc @@ -65,6 +65,9 @@ wider_completion_menu = False prompt = '\d> ' prompt_continuation = '-> ' +# Show/hide the informational toolbar with function keymap at the footer. +show_bottom_toolbar = True + # Skip intro info on startup and outro info on exit less_chatty = False diff --git a/litecli/main.py b/litecli/main.py index 24b1bb4..faa7322 100644 --- a/litecli/main.py +++ b/litecli/main.py @@ -83,6 +83,7 @@ class LiteCli(object): self.formatter.litecli = self self.syntax_style = c["main"]["syntax_style"] self.less_chatty = c["main"].as_bool("less_chatty") + self.show_bottom_toolbar = c["main"].as_bool("show_bottom_toolbar") self.cli_style = c["colors"] self.output_style = style_factory_output(self.syntax_style, self.cli_style) self.wider_completion_menu = c["main"].as_bool("wider_completion_menu") @@ -557,7 +558,7 @@ class LiteCli(object): reserve_space_for_menu=self.get_reserved_space(), message=get_message, prompt_continuation=get_continuation, - bottom_toolbar=get_toolbar_tokens, + bottom_toolbar=get_toolbar_tokens if self.show_bottom_toolbar else None, complete_style=complete_style, input_processors=[ ConditionalProcessor( @@ -24,7 +24,7 @@ readme = open_file("README.md") install_requirements = [ "click >= 4.1", - "Pygments >= 1.6", + "Pygments>=1.6,<=2.11.1", "prompt_toolkit>=3.0.3,<4.0.0", "sqlparse", "configobj >= 5.0.5", diff --git a/tests/test_sqlexecute.py b/tests/test_sqlexecute.py index 029c64b..e559bc6 100644 --- a/tests/test_sqlexecute.py +++ b/tests/test_sqlexecute.py @@ -210,7 +210,11 @@ def test_verbose_feature_of_favorite_query(executor): results = run(executor, "\\f sh_param 1") assert_result_equal( - results, title=None, headers=["a", "id"], rows=[("abc", 1)], auto_status=False, + results, + title=None, + headers=["a", "id"], + rows=[("abc", 1)], + auto_status=False, ) results = run(executor, "\\f+ sh_param 1") |