summaryrefslogtreecommitdiffstats
path: root/command.py
diff options
context:
space:
mode:
Diffstat (limited to 'command.py')
-rw-r--r--command.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/command.py b/command.py
index c3cad5ea..a941b95a 100644
--- a/command.py
+++ b/command.py
@@ -27,6 +27,9 @@ class Command(object):
27 manifest = None 27 manifest = None
28 _optparse = None 28 _optparse = None
29 29
30 def WantPager(self, opt):
31 return False
32
30 @property 33 @property
31 def OptionParser(self): 34 def OptionParser(self):
32 if self._optparse is None: 35 if self._optparse is None:
@@ -109,11 +112,15 @@ class InteractiveCommand(Command):
109 """Command which requires user interaction on the tty and 112 """Command which requires user interaction on the tty and
110 must not run within a pager, even if the user asks to. 113 must not run within a pager, even if the user asks to.
111 """ 114 """
115 def WantPager(self, opt):
116 return False
112 117
113class PagedCommand(Command): 118class PagedCommand(Command):
114 """Command which defaults to output in a pager, as its 119 """Command which defaults to output in a pager, as its
115 display tends to be larger than one screen full. 120 display tends to be larger than one screen full.
116 """ 121 """
122 def WantPager(self, opt):
123 return True
117 124
118class MirrorSafeCommand(object): 125class MirrorSafeCommand(object):
119 """Command permits itself to run within a mirror, 126 """Command permits itself to run within a mirror,