mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
fish: migrate to lib.cli.toCommandLineShell
Replace deprecated lib.cli.toGNUCommandLineShell with the new lib.cli.toCommandLineShell API, migrating from the old mkOption parameter format to the new optionFormat function. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
committed by
Matthieu Coudron
parent
a630bbdedd
commit
46c9af8a92
@@ -301,20 +301,13 @@ let
|
||||
let
|
||||
name = if isAttrs def && def.name != null then def.name else attrName;
|
||||
mods =
|
||||
lib.cli.toGNUCommandLineShell
|
||||
{
|
||||
mkOption =
|
||||
k: v:
|
||||
if v == null then
|
||||
[ ]
|
||||
else if k == "set-cursor" then
|
||||
[ "--${k}=${lib.generators.mkValueStringDefault { } v}" ]
|
||||
else
|
||||
[
|
||||
"--${k}"
|
||||
(lib.generators.mkValueStringDefault { } v)
|
||||
];
|
||||
}
|
||||
lib.cli.toCommandLineShell
|
||||
(optionName: {
|
||||
option = "--${optionName}";
|
||||
sep = if optionName == "set-cursor" then "=" else null;
|
||||
explicitBool = false;
|
||||
formatArg = lib.generators.mkValueStringDefault { };
|
||||
})
|
||||
{
|
||||
inherit (def)
|
||||
position
|
||||
|
||||
Reference in New Issue
Block a user