less: configure LESS options

This commit is contained in:
Benedikt Rips 2025-08-04 10:39:44 +02:00 committed by Austin Horstman
parent dfcea0573d
commit 67393957c2
5 changed files with 73 additions and 0 deletions

View file

@ -1,5 +1,6 @@
let
config = ''
#command
s back-line
t forw-line
'';

View file

@ -0,0 +1,27 @@
let
config = ''
#command
s back-line
t forw-line
'';
in
{
programs.less = {
enable = true;
inherit config;
options = {
RAW-CONTROL-CHARS = true;
quiet = true;
wheel-lines = 3;
};
};
nmt.script = ''
assertFileExists home-files/.config/lesskey
assertFileContent home-files/.config/lesskey ${builtins.toFile "less.expected" ''
#env
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines 3
${config}''}
'';
}

View file

@ -0,0 +1,18 @@
{
programs.less = {
enable = true;
options = {
RAW-CONTROL-CHARS = true;
quiet = true;
wheel-lines = 3;
};
};
nmt.script = ''
assertFileExists home-files/.config/lesskey
assertFileContent home-files/.config/lesskey ${builtins.toFile "lesskey.expected" ''
#env
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines 3
''}
'';
}

View file

@ -1,4 +1,6 @@
{
less-custom-config = ./custom-config.nix;
less-custom-options = ./custom-options.nix;
less-custom-options-and-config = ./custom-options-and-config.nix;
less-no-config = ./no-config.nix;
}