From 3a238861b56fc9503a0a0c5a6044d962363ff7be Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 6 Apr 2021 12:21:37 +0200 Subject: [PATCH] Make lpf-approve honor the PAGER environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit more doesn’t suite everybody’s needs, and it lacks some features, like you can’t scroll backwards. There are fancier pagers, like less, which might be preferred by some users. This commit honors the standard `PAGER` environment variable and uses that program if set. If not set, it defaults to the original `more` command. --- scripts/lpf-approve | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lpf-approve b/scripts/lpf-approve index 50183af..c6acf26 100755 --- a/scripts/lpf-approve +++ b/scripts/lpf-approve @@ -44,7 +44,7 @@ function cli_approve() # User approves EULA, no GUI. { local license=$1 - more $license + ${PAGER:-more} $license echo -n "Do you accept these license terms [n] ? " read reply [ -z "$reply" ] && reply='No'