1

On GNU/Linux is it possible to change the default pager for info command? I would like to use less as the pager (similar to man pages). I have customized less to use colors to make navigation of man pages much easier.

2 Answers 2

3

info doesn’t use a separate pager, because it handles navigation — it doesn’t produce a text document to be viewed with another tool. It doesn’t support paging to less.

You might find Pinfo interesting, it’s a replacement for info (and man) with configurable colours etc.

0

I was just wondering this myself, and I didn't want to install a replacement program for info.

For less, you can just pipe the output:

$ info coreutils | less 

This only works for pagers/editors that will accept stdin. E.g., vim will let you read stdin:

$ info coreutils | vim -R - 

The - is what tells it to read from stdin (this is just a convention, not all commands recognize this), and -R says to open read-only. It still works without -R, but complains about modified buffers.

You can then condense it by putting a function in your shell profile; e.g.:

linfo() { info $@ | less } 
2
  • Please don't offer answers to questions that were answered and accepted nearly half a decade ago. Commented Jan 22 at 15:43
  • And yet, this post was the first relevant one that came up when I searched for this exact issue, and the accepted answer does not actually answer the poster's question. I am not trying to take away anyone's green check. It's enough if another user with the same question saves a few minutes of their time. Commented Jan 23 at 16:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.