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:
Austin Horstman
2026-01-07 22:17:40 -06:00
committed by Matthieu Coudron
parent a630bbdedd
commit 46c9af8a92

View File

@@ -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