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

Windows support? #235

Closed karlhorky closed 8 months ago

karlhorky commented 9 months ago

I looked through the readme but could not figure out whether this is supported on Windows, via either:

  1. Usage via Git Bash, which uses MINGW/MSYS2
  2. Usage via WSL2

Ideally it would be great to get an installer via Chocolatey, to make this as easy as Homebrew installation on macOS/Linux.

okbob commented 9 months ago

Any volunteer for this? I don't use windows, so I know minimum about it. pspg is compilable against pdcurses, but I afraid so there is not correct implementation of newterm function. I expect so compilation inside WSL2 and Ubuntu should not be a problem.

karlhorky commented 9 months ago

Workaround with less --header <number>

Less (installed with Git Bash) supports a --header option which scrolls header rows along with the page.

This, combined with the --chop-long-lines option allows Windows Git Bash users to enjoy at least some features of pspg:

~/.bash_profile

export PSQL_PAGER="less --chop-long-lines --header 1"
okbob commented 9 months ago

Good to know it - I'll add it to readme

okbob commented 9 months ago

54049ec4aad667d850d0754ccbacb500c9a2a576

okbob commented 8 months ago

I tested pspg under wsl2 and wrote setup cb2d8ad14d9925eec3a461fab8da56c528e95dad It is just work