add global --pager option
This commit is contained in:
parent
5c6c983d25
commit
61857101fd
2 changed files with 4 additions and 0 deletions
|
|
@ -240,6 +240,7 @@ common_opts_data = {
|
|||
--, --color=0|1 Disable or enable color output (enabled by default)
|
||||
--, --columns=N Force N columns of output with certain commands
|
||||
--, --force-256-color Force 256-color output when color is enabled
|
||||
--, --pager Pipe output of certain commands to pager (WIP)
|
||||
--, --data-dir=path Specify {pnm} data directory location
|
||||
--, --daemon-data-dir=path Specify coin daemon data directory location
|
||||
--, --daemon-id=ID Specify the coin daemon ID
|
||||
|
|
|
|||
|
|
@ -601,6 +601,9 @@ def keypress_confirm(prompt,default_yes=False,verbose=False,no_nl=False,complete
|
|||
else:
|
||||
msg_r('\nInvalid reply\n' if verbose else '\r')
|
||||
|
||||
def stdout_or_pager(s):
|
||||
(do_pager if opt.pager else Msg_r)(s)
|
||||
|
||||
def do_pager(text):
|
||||
|
||||
pagers = ['less','more']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue