Unable to set argument to PAGER
Commands with no arguments work
\set PAGER 'less'
But it doesn't work with arguments
\set PAGER 'less --header 1'
SELECT * FROM test;
error: pq: exec: "less --header 1": executable file not found in $PATH
It was an example using less, but I am developing a pager and would like to specify many options to use it.
\set PAGER'ov -C -d "|" -H1 -F'
As a workaround, can you try using an alias or creating a wrapper script?
Of course, workarounds are possible. But I would like to show the user the best way to configure the pager. I think it's better to just write one line in the config file.
Sure, this is a valid issue/request, especially since it looks like psql allows to use a pager with arguments.
I sent a pull request to xo/tblfmt. Please let me know if you have any problems.
@noborus That is a great job. I did a very simple test and it looks good for me.
Please note that less has the LESS environment variable. This would have always worked by setting LESS in your shell environment.
$ export LESS='-S -I -R'