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:
parent
a630bbdedd
commit
46c9af8a92
1 changed files with 7 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue