diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/patman/tools.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py index 96882264a2..710f1fdcd3 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -5,6 +5,7 @@ import glob import os +import shlex import shutil import struct import sys @@ -588,9 +589,10 @@ def PrintFullHelp(fname): Args: fname: Path to a file containing the full help message """ - pager = os.getenv('PAGER') + pager = shlex.split(os.getenv('PAGER', '')) if not pager: - pager = shutil.which('less') + lesspath = shutil.which('less') + pager = [lesspath] if lesspath else None if not pager: - pager = 'more' - command.Run(pager, fname) + pager = ['more'] + command.Run(*pager, fname) |