1

I want to use less as my default pager. Therefore I have PAGER=less in my .bashrc. It's sourced properly:

$ echo $PAGER
less

However, psql still uses more if I call it with psql. BUT: If I call it with PAGER=less psql, psql does use less.

I have no idea why that is. Shouldn't the two calls be identical? man for example honors $PAGER. I know this because

  • MANPAGER is not set
  • PAGER=more man more works as expected
  • PAGER='' man more disables paging altogether (also as expected)

How do I get psql to recognize my pager setting?

musiKk
  • 375

1 Answers1

5

Try export PAGER=less in your .bashrc.

Cyrus
  • 5,751