Files
home-manager/tests/modules/programs/less/correct-option-order.nix
Austin Horstman a2cc7b0bab less: migrate to lib.cli.toCommandLineGNU
Migrates from the deprecated toCommandLine to toCommandLineGNU.

This changes the output format to use GNU-style options with equals
(--wheel-lines=3). Both formats were verified to work correctly with less.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-08 14:56:14 -05:00

31 lines
592 B
Nix

{ lib, ... }:
{
programs.less = {
enable = true;
options = lib.mkMerge [
{
quiet = true;
use-color = true;
}
(lib.mkAfter {
color = [
"HkK" # header: gray
"Mkb" # marks: blue
];
})
(lib.mkOrder 2000 {
prompt = "s%f";
})
];
};
nmt.script = ''
assertFileExists home-files/.config/lesskey
assertFileContent home-files/.config/lesskey ${builtins.toFile "lesskey.expected" ''
#env
LESS = --quiet --use-color --color=HkK --color=Mkb --prompt=s%f
''}
'';
}