| 1 |
Description: Prefer pager over more. |
| 2 |
GRASS 6 used a shell script to set the GRASS_PAGER environment variable. |
| 3 |
GRASS 7 reimplemented the shell script in Python. |
| 4 |
. |
| 5 |
The original version of this patch was made by Francesco Paolo Lovergine, and |
| 6 |
ported to Python by Bas Couwenberg. |
| 7 |
Author: Francesco Paolo Lovergine <[email protected]> |
| 8 |
Author: Bas Couwenberg <[email protected]> |
| 9 |
Forwarded: not-needed |
| 10 |
|
| 11 |
--- a/python/grass/app/runtime.py |
| 12 |
+++ b/python/grass/app/runtime.py |
| 13 |
@@ -347,10 +347,12 @@ def set_defaults(config_projshare_path): |
| 14 |
"""Set paths or commands for dependencies and auxiliary utilities""" |
| 15 |
# GRASS_PAGER |
| 16 |
if not os.getenv("GRASS_PAGER"): |
| 17 |
- if shutil.which("more"): |
| 18 |
- pager = "more" |
| 19 |
+ if shutil.which("pager"): |
| 20 |
+ pager = "pager" |
| 21 |
elif shutil.which("less"): |
| 22 |
pager = "less" |
| 23 |
+ elif shutil.which("more"): |
| 24 |
+ pager = "more" |
| 25 |
elif WINDOWS: |
| 26 |
pager = "more" |
| 27 |
else: |