oscarmlage oscarmlage

Mercurial: pager extension

Written by oscarmlage on

Sometimes when you are using Mercurial you want to paginate the output results. With paginate I mean use someting like bash more or less commands. Trying to focus yourself in a long list display is nearly imposible without a pager, so you can do it old-school-style:

$ hg st | more
$ hg st | less

Or you can activate the Mercurial PagerExtension, easy peasy:


pager = LESS='FRX' less
attend =
ignore = help

Once you have saved theese lines on your ~/.hgrc, all the Mercurial commands will be paged. Remember that, by default, PagerExtension only works with annotate, cat, diff, export, glog, log and qdiff commands. If you want it to be run with all the commands you have to add the "attend=" line. On the other hand, if you want to ignore some commands you can specify that with the "ignore" option as you can see in the above sample.

Mercurial Pager

More information about the PagerExtension and Mercurial in general: