mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
patman: Use less for help file, if available
It's convenient to be able to scroll up in `patman -H`. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3a03553aaa
commit
b1b6efc343
|
@ -9,6 +9,7 @@
|
|||
from argparse import ArgumentParser
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
import unittest
|
||||
|
@ -170,6 +171,8 @@ elif args.cmd == 'send':
|
|||
|
||||
elif args.full_help:
|
||||
pager = os.getenv('PAGER')
|
||||
if not pager:
|
||||
pager = shutil.which('less')
|
||||
if not pager:
|
||||
pager = 'more'
|
||||
fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
|
||||
|
|
Loading…
Reference in New Issue
Block a user