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] diff --git a/setup.py b/setup.py index 34b1c0d1..d21a5be7 100644 --- a/setup.py +++ b/setup.py @@ -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", ]