summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSky.G.Uieen <guieenoutis@gmail.com>2020-07-08 12:19:22 +0900
committerGitHub <noreply@github.com>2020-07-07 20:19:22 -0700
commit41dd24e8da9a812cb41e022c33dbe9835361d7b6 (patch)
tree8880deaf980df04c2ed894ec8bfc0d33076e885b
parent77414aa9e75f89cca9d248d4c0f3b9f1959007c8 (diff)
Add custom color (#1196)
* Updated author, changelog for supporting color of string, number, keyword * Added string, number, keyword custom color
-rw-r--r--AUTHORS1
-rw-r--r--changelog.rst2
-rw-r--r--pgcli/pgclirc3
-rw-r--r--pgcli/pgstyle.py3
4 files changed, 8 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 07b19b81..12298156 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -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.