chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43447fb
)
pager: always override LESS
author
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Mar 2013 20:28:09 +0000
(21:28 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Mar 2013 20:28:09 +0000
(21:28 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=868383
Primary reason to do this is to ensure "-e" works as intended, and is
not ignored because the user set his own LESS variable.
src/shared/pager.c
patch
|
blob
|
history
diff --git
a/src/shared/pager.c
b/src/shared/pager.c
index 4ffb530e934810b41f3455e1ea18bae8a6054196..e9aa022a73fe3718f5ebf53935a5a80bf1d88a42 100644
(file)
--- a/
src/shared/pager.c
+++ b/
src/shared/pager.c
@@
-86,9
+86,9
@@
int pager_open(bool jump_to_end) {
close_pipe(fd);
if (jump_to_end)
- setenv("LESS", "FRSXK+G",
0
);
+ setenv("LESS", "FRSXK+G",
1
);
else
- setenv("LESS", "FRSXK",
0
);
+ setenv("LESS", "FRSXK",
1
);
/* Make sure the pager goes away when the parent dies */
if (prctl(PR_SET_PDEATHSIG, SIGTERM) < 0)