pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

It's hard to distinguish column names of table

Open hwooo opened this issue 6 years ago • 1 comments
trafficstars

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

  • [ ] Windows 10 18362.145
  • [ ] 2.1.0
  • [ ] What is the output of pip freeze command.
aniso8601==6.0.0
asn1crypto==0.24.0
beautifulsoup4==4.7.1
blinker==1.4
bs4==0.0.1
certifi==2019.3.9
cffi==1.12.2
chardet==3.0.4
cli-helpers==1.2.0
Click==7.0
colorama==0.4.1
configobj==5.0.6
cryptography==2.6.1
Django==2.2
Flask==1.0.2
Flask-Mail==0.9.1
Flask-MySQL==1.4.0
Flask-RESTful==0.3.7
httpie==1.0.2
humanize==0.5.1
idna==2.8
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
mycli==1.19.0
pgcli==2.1.0
pgspecial==1.11.5
prompt-toolkit==2.0.9
psycopg2==2.7.7
pycparser==2.19
Pygments==2.3.1
PyJWT==1.7.1
pymongo==3.8.0
PyMySQL==0.9.3
pytz==2018.9
requests==2.21.0
selenium==3.141.0
setproctitle==1.1.10
six==1.12.0
soupsieve==1.9
sqlparse==0.2.4
tabulate==0.8.3
terminaltables==3.1.0
urllib3==1.24.1
wcwidth==0.1.7
Werkzeug==0.15.2

hwooo avatar Jun 08 '19 02:06 hwooo

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.

j-bennet avatar Jun 08 '19 03:06 j-bennet

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.

dbaty avatar Nov 15 '23 20:11 dbaty

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.

sryze avatar Nov 17 '23 12:11 sryze

@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.

j-bennet avatar Nov 18 '23 05:11 j-bennet