| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>Pager Support</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="pager-support"> |
| 12 |
<span id="topic-pager"></span> |
| 13 |
<h1 class="title">Pager Support</h1> |
| 14 |
|
| 15 |
<p id="pager">Some Mercurial commands can produce a lot of output, and Mercurial will |
| 16 |
attempt to use a pager to make those commands more pleasant.</p> |
| 17 |
<p>To set the pager that should be used, set the application variable:</p> |
| 18 |
<pre class="literal-block"> |
| 19 |
[pager] |
| 20 |
pager = less -FRX |
| 21 |
</pre> |
| 22 |
<p>If no pager is set in the user or repository configuration, Mercurial uses the |
| 23 |
environment variable $PAGER. If $PAGER is not set, pager.pager from the default |
| 24 |
or system configuration is used. If none of these are set, a default pager will |
| 25 |
be used, typically <cite>less</cite> on Unix and <cite>more</cite> on Windows.</p> |
| 26 |
<div class="windows docutils container"> |
| 27 |
On Windows, <cite>more</cite> is not color aware, so using it effectively disables color. |
| 28 |
MSYS and Cygwin shells provide <cite>less</cite> as a pager, which can be configured to |
| 29 |
support ANSI color codes. See <a class="reference external" href="hgrc.5.html#color"><tt class="docutils literal">hg help config.color.pagermode</tt></a> to configure |
| 30 |
the color mode when invoking a pager.</div> |
| 31 |
<p>You can disable the pager for certain commands by adding them to the |
| 32 |
pager.ignore list:</p> |
| 33 |
<pre class="literal-block"> |
| 34 |
[pager] |
| 35 |
ignore = version, help, update |
| 36 |
</pre> |
| 37 |
<p>To ignore global commands like <a class="reference external" href="hg-version.html"><tt class="docutils literal">hg version</tt></a> or <a class="reference external" href="hg-help.html"><tt class="docutils literal">hg help</tt></a>, you have |
| 38 |
to specify them in your user configuration file.</p> |
| 39 |
<p>To control whether the pager is used at all for an individual command, |
| 40 |
you can use --pager=<value>:</p> |
| 41 |
<blockquote> |
| 42 |
<ul class="simple"> |
| 43 |
<li>use as needed: <cite>auto</cite>.</li> |
| 44 |
<li>require the pager: <cite>yes</cite> or <cite>on</cite>.</li> |
| 45 |
<li>suppress the pager: <cite>no</cite> or <cite>off</cite> (any unrecognized value |
| 46 |
will also work).</li> |
| 47 |
</ul> |
| 48 |
</blockquote> |
| 49 |
<p>To globally turn off all attempts to use a pager, set:</p> |
| 50 |
<pre class="literal-block"> |
| 51 |
[ui] |
| 52 |
paginate = never |
| 53 |
</pre> |
| 54 |
<p>which will prevent the pager from running.</p> |
| 55 |
</div> |
| 56 |
</body> |
| 57 |
</html> |