mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59: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
|
let
|
||||||
name = if isAttrs def && def.name != null then def.name else attrName;
|
name = if isAttrs def && def.name != null then def.name else attrName;
|
||||||
mods =
|
mods =
|
||||||
lib.cli.toGNUCommandLineShell
|
lib.cli.toCommandLineShell
|
||||||
{
|
(optionName: {
|
||||||
mkOption =
|
option = "--${optionName}";
|
||||||
k: v:
|
sep = if optionName == "set-cursor" then "=" else null;
|
||||||
if v == null then
|
explicitBool = false;
|
||||||
[ ]
|
formatArg = lib.generators.mkValueStringDefault { };
|
||||||
else if k == "set-cursor" then
|
})
|
||||||
[ "--${k}=${lib.generators.mkValueStringDefault { } v}" ]
|
|
||||||
else
|
|
||||||
[
|
|
||||||
"--${k}"
|
|
||||||
(lib.generators.mkValueStringDefault { } v)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
inherit (def)
|
inherit (def)
|
||||||
position
|
position
|
||||||
|
|||||||
Reference in New Issue
Block a user