Show More
@@ -8,7 +8,7 b' To set the pager that should be used, se' | |||||
8 |
|
8 | |||
9 | If no pager is set, the pager extensions uses the environment variable |
|
9 | If no pager is set, the pager extensions uses the environment variable | |
10 | $PAGER. If neither pager.pager, nor $PAGER is set, a default pager |
|
10 | $PAGER. If neither pager.pager, nor $PAGER is set, a default pager | |
11 | will be used, typically `more`. |
|
11 | will be used, typically `less` on Unix and `more` on Windows. | |
12 |
|
12 | |||
13 | You can disable the pager for certain commands by adding them to the |
|
13 | You can disable the pager for certain commands by adding them to the | |
14 | pager.ignore list:: |
|
14 | pager.ignore list:: |
@@ -21,6 +21,7 b" if pycompat.osname == 'nt':" | |||||
21 | else: |
|
21 | else: | |
22 | from . import scmposix as scmplatform |
|
22 | from . import scmposix as scmplatform | |
23 |
|
23 | |||
|
24 | fallbackpager = scmplatform.fallbackpager | |||
24 | systemrcpath = scmplatform.systemrcpath |
|
25 | systemrcpath = scmplatform.systemrcpath | |
25 | userrcpath = scmplatform.userrcpath |
|
26 | userrcpath = scmplatform.userrcpath | |
26 |
|
27 |
@@ -12,6 +12,12 b' from . import (' | |||||
12 | pycompat, |
|
12 | pycompat, | |
13 | ) |
|
13 | ) | |
14 |
|
14 | |||
|
15 | # BSD 'more' escapes ANSI color sequences by default. This can be disabled by | |||
|
16 | # $MORE variable, but there's no compatible option with Linux 'more'. Given | |||
|
17 | # OS X is widely used and most modern Unix systems would have 'less', setting | |||
|
18 | # 'less' as the default seems reasonable. | |||
|
19 | fallbackpager = 'less' | |||
|
20 | ||||
15 | def _rcfiles(path): |
|
21 | def _rcfiles(path): | |
16 | rcs = [os.path.join(path, 'hgrc')] |
|
22 | rcs = [os.path.join(path, 'hgrc')] | |
17 | rcdir = os.path.join(path, 'hgrc.d') |
|
23 | rcdir = os.path.join(path, 'hgrc.d') |
@@ -16,6 +16,9 b' try:' | |||||
16 | except ImportError: |
|
16 | except ImportError: | |
17 | import winreg |
|
17 | import winreg | |
18 |
|
18 | |||
|
19 | # MS-DOS 'more' is the only pager available by default on Windows. | |||
|
20 | fallbackpager = 'more' | |||
|
21 | ||||
19 | def systemrcpath(): |
|
22 | def systemrcpath(): | |
20 | '''return default os-specific hgrc search path''' |
|
23 | '''return default os-specific hgrc search path''' | |
21 | rcpath = [] |
|
24 | rcpath = [] |
@@ -857,8 +857,7 b' class ui(object):' | |||||
857 | # HGPLAINEXCEPT=pager, and the user didn't specify --debug. |
|
857 | # HGPLAINEXCEPT=pager, and the user didn't specify --debug. | |
858 | return |
|
858 | return | |
859 |
|
859 | |||
860 | fallbackpager = 'more' |
|
860 | pagercmd = self.config('pager', 'pager', rcutil.fallbackpager) | |
861 | pagercmd = self.config('pager', 'pager', fallbackpager) |
|
|||
862 | if not pagercmd: |
|
861 | if not pagercmd: | |
863 | return |
|
862 | return | |
864 |
|
863 |
General Comments 0
You need to be logged in to leave comments.
Login now