okbob / pspg

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
BSD 2-Clause "Simplified" License
2.43k stars 85 forks source link

Feature req: freeze-columns as a config file setting #217

Closed urandom closed 1 year ago

urandom commented 1 year ago

Hi,

It looks like freeze-columns is not currently support as input from the config file (https://github.com/okbob/pspg/blob/master/src/config.c#L362). I'd like for it to be there, as I'm always turning of the default "1" when I use pspg

okbob commented 1 year ago

Hi

I afraid so saving current freezed columns to config file can be little bit messy (more because freezing is in command menu, not in option menu).

But you can use -c option in command line, and you can set like:

export PSQL_PAGER='pspg'
export PSPG_CONF='-c 1'
urandom commented 1 year ago

Hi okbob

It looks like setting PSPG_CONF='-c 0' doesn't really work, as the first column is still frozen. It also starts ignoring the ~/.pspgconf file as well, which has some other configuration that I like

okbob commented 1 year ago

I was wrong - PSPG_CONF is path to pspg config file. You should to change the PSPG variable. I am sorry.