Skip to content

Commit

Permalink
Add custom color (#1196)
Browse files Browse the repository at this point in the history
* Updated author, changelog for supporting color of string, number, keyword

* Added string, number, keyword custom color
  • Loading branch information
GUIEEN authored Jul 8, 2020
1 parent 77414aa commit 41dd24e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Contributors:
* Panos Mavrogiorgos (pmav99)
* Igor Kim (igorkim)
* Anthony DeBarros (anthonydb)
* Seungyong Kwak (GUIEEN)

Creator:
--------
Expand Down
2 changes: 1 addition & 1 deletion changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
----------
Expand Down
3 changes: 3 additions & 0 deletions pgcli/pgclirc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions pgcli/pgstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
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.
Expand Down

0 comments on commit 41dd24e

Please sign in to comment.