mirror of https://github.com/dbcli/pgcli
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.
This commit is contained in:
parent
4a98b37877
commit
0c24e8bda2
|
@ -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:
|
||||
----------
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue