diff options
author | laixintao <laixintao@users.noreply.github.com> | 2020-05-29 06:29:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 15:29:50 -0700 |
commit | 0c24e8bda226f3dbd6ccb0381515a9c903847249 (patch) | |
tree | 3b6740660e9c821743cd04a1d2ff462484099085 | |
parent | 4a98b37877050d0ff8cf475dc2fb8b3a93c7da89 (diff) |
Support style for missing value. (#1186)
* Support style for missing value.
* update changelog.
* upgrade minimal version of cli_helpers, in order to use style for null.
-rw-r--r-- | changelog.rst | 1 | ||||
-rw-r--r-- | pgcli/pgclirc | 1 | ||||
-rw-r--r-- | pgcli/pgstyle.py | 3 | ||||
-rw-r--r-- | setup.py | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/changelog.rst b/changelog.rst index 31e3a771..e6f162a8 100644 --- a/changelog.rst +++ b/changelog.rst @@ -7,6 +7,7 @@ Features: * Make the output more compact by removing the empty newline. (Thanks: `laixintao`_) * Add support for using [pspg](https://github.com/okbob/pspg) as a pager (#1102) * Update python version in Dockerfile +* Support setting color for null value Bug fixes: ---------- diff --git a/pgcli/pgclirc b/pgcli/pgclirc index 6b894d4a..29d1dbd8 100644 --- a/pgcli/pgclirc +++ b/pgcli/pgclirc @@ -175,6 +175,7 @@ bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' output.header = "#00ff5f bold" output.odd-row = "" output.even-row = "" +output.null = "#808080" # Named queries are queries you can execute by name. [named queries] diff --git a/pgcli/pgstyle.py b/pgcli/pgstyle.py index a2f29737..71fa571a 100644 --- a/pgcli/pgstyle.py +++ b/pgcli/pgstyle.py @@ -34,6 +34,7 @@ TOKEN_TO_PROMPT_STYLE = { Token.Output.Header: "output.header", Token.Output.OddRow: "output.odd-row", Token.Output.EvenRow: "output.even-row", + Token.Output.Null: "output.null", } # reverse dict for cli_helpers, because they still expect Pygments tokens. @@ -52,7 +53,7 @@ def parse_pygments_style(token_name, style_object, style_dict): try: other_token_type = string_to_tokentype(style_dict[token_name]) return token_type, style_object.styles[other_token_type] - except AttributeError as err: + except AttributeError: return token_type, style_dict[token_name] @@ -14,7 +14,7 @@ install_requirements = [ "sqlparse >=0.3.0,<0.4", "configobj >= 5.0.6", "humanize >= 0.5.1", - "cli_helpers[styles] >= 1.2.0", + "cli_helpers[styles] >= 2.0.0", ] |