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 /pgcli | |
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.
Diffstat (limited to 'pgcli')
-rw-r--r-- | pgcli/pgclirc | 1 | ||||
-rw-r--r-- | pgcli/pgstyle.py | 3 |
2 files changed, 3 insertions, 1 deletions
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] |