summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus F.X.J. Oberhumer <markus@oberhumer.com>2021-04-13 11:14:23 +0200
committerMarkus F.X.J. Oberhumer <markus@oberhumer.com>2021-04-13 21:00:13 +0200
commit61798244e552f5663fb7546644ba26c11410d3d2 (patch)
tree8871eef8ccf8549440d69262e59aa6916ab9aa02
parent401c466fcd0d21a3e529173dfd9271f7269cb1e5 (diff)
downloadbfs-61798244e552f5663fb7546644ba26c11410d3d2.tar.xz
parse: check if PAGER environment variable is empty.
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index a315243..4d4702c 100644
--- a/parse.c
+++ b/parse.c
@@ -2494,7 +2494,7 @@ static struct expr *parse_xdev(struct parser_state *state, int arg1, int arg2) {
*/
static CFILE *launch_pager(pid_t *pid, CFILE *cout) {
char *pager = getenv("PAGER");
- if (!pager) {
+ if (!pager || !pager[0]) {
pager = "more";
}