Show More
@@ -35,10 +35,13 b' pager.ignore list::' | |||||
35 | ignore = version, help, update |
|
35 | ignore = version, help, update | |
36 |
|
36 | |||
37 | You can also enable the pager only for certain commands using |
|
37 | You can also enable the pager only for certain commands using | |
38 | pager.attend:: |
|
38 | pager.attend. Below is the default list of commands to be paged:: | |
39 |
|
39 | |||
40 | [pager] |
|
40 | [pager] | |
41 | attend = log |
|
41 | attend = annotate, cat, diff, export, glog, log, qdiff | |
|
42 | ||||
|
43 | Setting pager.attend to an empty value will cause all commands to be | |||
|
44 | paged. | |||
42 |
|
45 | |||
43 | If pager.attend is present, pager.ignore will be ignored. |
|
46 | If pager.attend is present, pager.ignore will be ignored. | |
44 |
|
47 | |||
@@ -53,7 +56,7 b' def uisetup(ui):' | |||||
53 | def pagecmd(orig, ui, options, cmd, cmdfunc): |
|
56 | def pagecmd(orig, ui, options, cmd, cmdfunc): | |
54 | p = ui.config("pager", "pager", os.environ.get("PAGER")) |
|
57 | p = ui.config("pager", "pager", os.environ.get("PAGER")) | |
55 | if p and sys.stdout.isatty() and '--debugger' not in sys.argv: |
|
58 | if p and sys.stdout.isatty() and '--debugger' not in sys.argv: | |
56 | attend = ui.configlist('pager', 'attend') |
|
59 | attend = ui.configlist('pager', 'attend', attended) | |
57 | if (cmd in attend or |
|
60 | if (cmd in attend or | |
58 | (cmd not in ui.configlist('pager', 'ignore') and not attend)): |
|
61 | (cmd not in ui.configlist('pager', 'ignore') and not attend)): | |
59 | sys.stderr = sys.stdout = util.popen(p, "wb") |
|
62 | sys.stderr = sys.stdout = util.popen(p, "wb") | |
@@ -62,3 +65,5 b' def uisetup(ui):' | |||||
62 | return orig(ui, options, cmd, cmdfunc) |
|
65 | return orig(ui, options, cmd, cmdfunc) | |
63 |
|
66 | |||
64 | extensions.wrapfunction(dispatch, '_runcommand', pagecmd) |
|
67 | extensions.wrapfunction(dispatch, '_runcommand', pagecmd) | |
|
68 | ||||
|
69 | attended = ['annotate', 'cat', 'diff', 'export', 'glog', 'log', 'qdiff'] |
General Comments 0
You need to be logged in to leave comments.
Login now