home: pager: use long option names

Makes it more readable.
This commit is contained in:
Bruno BELANYI 2026-01-02 15:13:04 +00:00
parent 7a7da21a27
commit fe7b0a57a8

View file

@ -22,8 +22,19 @@ in
home.sessionVariables = { home.sessionVariables = {
# My default pager # My default pager
PAGER = "less"; PAGER = "less";
# Clear the screen on start and exit # Set `LESS` in the environment so it overrides git's pager (and others)
LESS = "-R -+X -c"; LESS =
let
options = {
# Always use the alternate screen (so that it is cleared on exit)
"+no-init" = true;
# Write text top-down, rather than from the bottom
clear-screen = true;
# Interpret (some) escape sequences
RAW-CONTROL-CHARS = true;
};
in
lib.concatStringsSep " " (lib.cli.toCommandLineGNU { } options);
# Better XDG compliance # Better XDG compliance
LESSHISTFILE = "${config.xdg.stateHome}/less/history"; LESSHISTFILE = "${config.xdg.stateHome}/less/history";
}; };