pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

Allow setting a pager with flag

Open aristidebm opened this issue 4 months ago • 0 comments

Thank you guys for this very useful piece of software and all the time and effort put in mainting it.

Here is my usecase, I want to set my pager to what is recommended here pspg with a slight modification, but it does not work

pager = /usr/bin/pspg --clipboard-app=2 --rr=2 --quit-if-one-screen --ignore-case

After some time spent on understanding why it does not work, I have discovered that the problem is due to the version of click that pgcli is using, in version 8.1.x of click, the pager was not assumed to accept flags. This is what I have on my system in click code base

Image

This is what we now have on click main branch

Image https://github.com/pallets/click/blob/main/src/click/_termui_impl.py#L412

In new versions of click the cmd is sanitize with shlex.split(...) to separate the actual command from flags before calling the shutil.which(...)

aristidebm avatar Jun 14 '25 19:06 aristidebm