diff options
author | Sky.G.Uieen <guieenoutis@gmail.com> | 2020-07-08 12:19:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 20:19:22 -0700 |
commit | 41dd24e8da9a812cb41e022c33dbe9835361d7b6 (patch) | |
tree | 8880deaf980df04c2ed894ec8bfc0d33076e885b | |
parent | 77414aa9e75f89cca9d248d4c0f3b9f1959007c8 (diff) |
Add custom color (#1196)
* Updated author, changelog for supporting color of string, number, keyword
* Added string, number, keyword custom color
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | changelog.rst | 2 | ||||
-rw-r--r-- | pgcli/pgclirc | 3 | ||||
-rw-r--r-- | pgcli/pgstyle.py | 3 |
4 files changed, 8 insertions, 1 deletions
@@ -110,6 +110,7 @@ Contributors: * Panos Mavrogiorgos (pmav99) * Igor Kim (igorkim) * Anthony DeBarros (anthonydb) + * Seungyong Kwak (GUIEEN) Creator: -------- diff --git a/changelog.rst b/changelog.rst index f2510394..e81d0b73 100644 --- a/changelog.rst +++ b/changelog.rst @@ -7,7 +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 +* Support setting color for null, string, number, keyword value Bug fixes: ---------- diff --git a/pgcli/pgclirc b/pgcli/pgclirc index 29d1dbd8..e97afdab 100644 --- a/pgcli/pgclirc +++ b/pgcli/pgclirc @@ -170,6 +170,9 @@ arg-toolbar = 'noinherit bold' arg-toolbar.text = 'nobold' bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold' bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' +literal.string = '#ba2121' +literal.number = '#666666' +keyword = 'bold #008000' # style classes for colored table output output.header = "#00ff5f bold" diff --git a/pgcli/pgstyle.py b/pgcli/pgstyle.py index 71fa571a..2ee3e200 100644 --- a/pgcli/pgstyle.py +++ b/pgcli/pgstyle.py @@ -35,6 +35,9 @@ TOKEN_TO_PROMPT_STYLE = { Token.Output.OddRow: "output.odd-row", Token.Output.EvenRow: "output.even-row", Token.Output.Null: "output.null", + Token.Literal.String: "literal.string", + Token.Literal.Number: "literal.number", + Token.Keyword: "keyword", } # reverse dict for cli_helpers, because they still expect Pygments tokens. |