mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 01:19:32 +08:00
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>
This commit is contained in:
@@ -45,7 +45,7 @@ in
|
||||
];
|
||||
attrs = attrsOf (either scalar (listOf scalar));
|
||||
in
|
||||
coercedTo attrs (lib.cli.toGNUCommandLine { }) (listOf str);
|
||||
coercedTo attrs (lib.cli.toCommandLineGNU { }) (listOf str);
|
||||
default = [ ];
|
||||
description = "Options to be set via {env}`$LESS`.";
|
||||
example = {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
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
|
||||
LESS = --quiet --use-color --color=HkK --color=Mkb --prompt=s%f
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ in
|
||||
assertFileExists home-files/.config/lesskey
|
||||
assertFileContent home-files/.config/lesskey ${builtins.toFile "less.expected" ''
|
||||
#env
|
||||
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines 3 --wheel-lines 1
|
||||
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines=3 --wheel-lines=1
|
||||
|
||||
${config}''}
|
||||
'';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
assertFileExists home-files/.config/lesskey
|
||||
assertFileContent home-files/.config/lesskey ${builtins.toFile "lesskey.expected" ''
|
||||
#env
|
||||
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines 3 --wheel-lines 1
|
||||
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines=3 --wheel-lines=1
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user