dbcli / pgcli

Postgres CLI with autocompletion and syntax highlighting
http://pgcli.com
BSD 3-Clause "New" or "Revised" License
12.04k stars 553 forks source link

It's hard to distinguish column names of table #1069

Closed hwooo closed 10 months ago

hwooo commented 5 years ago

Description

title

Title color of tables is white foreground with grey background so it's hard to distinguish. This issue occurs in mycli too.

Your environment

j-bennet commented 5 years ago

You can override table header style in your ~/.myclirc (or ~/.config/pgcli/config). See this line:

https://github.com/dbcli/mycli/blob/05a0e4ad9523d839c610574326030ad180acaafe/mycli/myclirc#L110

Try setting background color explicitly to override that grey, for example: bg:#000000 #ff0000 bold.

@jonathanslenders Where did that grey background color came from? It does not seem like it's a mycli default.

dbaty commented 10 months ago

This issue is old and has been reported against 2.1.0, which has been released 4 years ago. I cannot reproduce this issue with the latest version of pgcli (4.0.1): with a black background, column names appear in bold green (and I don't think I have customized anything). I'll suppose that this issue has been fixed, and am closing it.

sryze commented 10 months ago

I can reproduce this issue with pgcli 4.0.1 in cmd.exe or in PowerShell/Git Bash inside Wndows Terminal (with the One Half Dark theme).

image image

It appears that my config is not the cause as the same happens if I delete it.

j-bennet commented 10 months ago

@sryze

If you deleted the pgcli's default config file, it would create a new one in the user directory. For Linux or Mac, this would be ~/.config/pgcli/config; for Windows, %USERPROFILE%\\AppData\\Local\\dbcli\\pgcli\\config.

For this header, the style is controlled by the output.header setting. On my system, with default settings, it looks like this:

image

However, when I set it as follows:

output.header = 'bg:#cccccc #ff0000 bold'

the look changes:

image

It appears that my config is not the cause as the same happens if I delete it.

Not necessarily. What you're seeing might be happening because the default pgcli config settings don't play well with your terminal colors. Try changing the style n the config and see if that changes anything. You'll have to exit and restart pgcli to pick up the change.