Skip to content

Commit d5e9499

Browse files
committed
enable customization of table borders in myclirc
Styling table borders with a Pygments style turns out to have been already implemented in cli_helpers, per * https://github.com/dbcli/cli_helpers/blob/9fb9f656ea8f4ab8230c2e4633526791d2d7438e/cli_helpers/tabular_output/tabulate_adapter.py#L163 In the mycli project, we just need to define Token.Output.TableSeparator and make it configurable by the user in ~/.myclirc.
1 parent 67ba854 commit d5e9499

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Upcoming (TBD)
2+
==============
3+
4+
Features
5+
---------
6+
* Enable customization of table border color/attributes in `~/.myclirc`.
7+
8+
19
1.58.0 (2026/02/28)
210
==============
311

mycli/clistyle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
Token.Output.OddRow: "output.odd-row",
3737
Token.Output.EvenRow: "output.even-row",
3838
Token.Output.Null: "output.null",
39+
Token.Output.TableSeparator: "output.table-separator",
3940
Token.Prompt: "prompt",
4041
Token.Continuation: "continuation",
4142
}

mycli/myclirc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ output.header = "#00ff5f bold"
250250
output.odd-row = ""
251251
output.even-row = ""
252252
output.null = "#808080"
253+
output.table-separator = ""
253254

254255
# SQL syntax highlighting overrides
255256
# sql.comment = 'italic #408080'

test/myclirc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ output.header = "#00ff5f bold"
248248
output.odd-row = ""
249249
output.even-row = ""
250250
output.null = "#808080"
251+
output.table-separator = ""
251252

252253
# SQL syntax highlighting overrides
253254
# sql.comment = 'italic #408080'

0 commit comments

Comments
 (0)