[PATCH] 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 ---
tools/patman/main.py | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/tools/patman/main.py b/tools/patman/main.py index c4e4d80d4250..5830c5a5e24f 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -9,6 +9,7 @@ from argparse import ArgumentParser import os import re +import shutil import sys import traceback import unittest @@ -169,6 +170,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])),

On Wed, 17 Feb 2021 at 03:41, Nicolas Boichat drinkcat@chromium.org wrote:
It's convenient to be able to scroll up in `patman -H`.
Signed-off-by: Nicolas Boichat drinkcat@chromium.org
tools/patman/main.py | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, 17 Feb 2021 at 03:41, Nicolas Boichat drinkcat@chromium.org wrote:
It's convenient to be able to scroll up in `patman -H`.
Signed-off-by: Nicolas Boichat drinkcat@chromium.org
tools/patman/main.py | 3 +++ 1 file changed, 3 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm/next, thanks!
participants (2)
-
Nicolas Boichat
-
Simon Glass