less: set PAGER variable
PATCH 1/1 less: set PAGER variable
The system/skeleton/etc/profile sets PAGER to /bin/more. Not sure why, but this defeats pager autodetection by various tool (systemctl, nmcli, etc.) that would otherwise prefer less to more.
Let's override the PAGER variable if the user chooses to install the less package.
--- package/less/less.mk | 2 ++ 1 file changed, 2 insertions(+)
package/less/less.mk +2 -0
@@ -12,6 +12,8 @@ LESS_DEPENDENCIES = ncurses define LESS_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less + mkdir -p $(TARGET_DIR)/etc/profile.d + echo "export PAGER='/bin/less'" > $(TARGET_DIR)/etc/profile.d/less.sh endef $(eval $(autotools-package))
Signature · 1 line
2.21.0
PATCH 1/1 less: set PAGER variable
Hello,
Quoted 3 lines · On Mon, 2 Sep 2019 15:39:55 +0200 Lubomir Rintel <[email protected]> wrote:
The system/skeleton/etc/profile sets PAGER to
/bin/more. Not sure why, but this defeats pager autodetection by various tool (systemctl, nmcli, etc.) that would otherwise prefer less to more.
Perhaps we should simply remove the PAGER definition in etc/profile, then ?
In any case, your patch lacks an SoB.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 less: set PAGER variable
Quoted 10 lines · Thomas Petazzoni
Hello,
Quoted 3 lines · On Mon, 2 Sep 2019 15:39:55 +0200 Lubomir Rintel <[email protected]> wrote:
The system/skeleton/etc/profile sets PAGER to
/bin/more. Not sure why, but this defeats pager autodetection by various tool (systemctl, nmcli, etc.) that would otherwise prefer less to more.Perhaps we should simply remove the PAGER definition in etc/profile, then ?
That indeed seems to be a better idea.
Quoted 5 lines
In any case, your patch lacks an SoB.
Thanks,
Thomas
Thanks
Lubo