16

Is there a way to make mercurial use less to show me the logs/diffs/whatever by default? Now mercurial just displays everything when I type 'hg log'. I suppose I can use aliases like 'hg log = less hg log' if I want to. I'm wondering if there're better solutions.

Joan Charmant
  • 2,012
  • 1
  • 18
  • 23
liangzan
  • 6,804
  • 4
  • 29
  • 28

2 Answers2

22

See the pager extension:

Browse command output using an external pager

It's distributed with mercurial, so you just need to activate it in hgrc.

jaques-sam
  • 2,578
  • 1
  • 26
  • 24
tonfa
  • 24,151
  • 2
  • 35
  • 41
1

If you are using less on hg log because it shows the results in reverse order, and therefore the most recent versions scroll off the screen, then you can reverse the order using

hg log -r:

I find this command so useful, yet the colon so unintuitive, I have to look it up here every time

Community
  • 1
  • 1
David Sykes
  • 48,469
  • 17
  • 71
  • 80