mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 17:11:03 +01:00
jq: add missing color option (#6734)
added "color for object keys" option https://jqlang.org/manual/#colors
This commit is contained in:
parent
5ee44bc7c2
commit
81f38986a2
2 changed files with 22 additions and 8 deletions
|
|
@ -2211,6 +2211,17 @@ in {
|
||||||
Nix's store) old Home-Manager generations.
|
Nix's store) old Home-Manager generations.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2025-03-31T16:39:41+00:00";
|
||||||
|
condition = config.programs.jq.enable;
|
||||||
|
message = ''
|
||||||
|
Jq module now supports color for object keys
|
||||||
|
|
||||||
|
Your configuration will break if you have defined the "programs.jq.colors" option.
|
||||||
|
To resolve this, please add `objectKeys` to your assignment of `programs.jq.colors`.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ let
|
||||||
strings = colorType;
|
strings = colorType;
|
||||||
arrays = colorType;
|
arrays = colorType;
|
||||||
objects = colorType;
|
objects = colorType;
|
||||||
|
objectKeys = colorType;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -45,13 +46,14 @@ in {
|
||||||
|
|
||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
{
|
{
|
||||||
null = "1;30";
|
null = "1;30";
|
||||||
false = "0;31";
|
false = "0;31";
|
||||||
true = "0;32";
|
true = "0;32";
|
||||||
numbers = "0;36";
|
numbers = "0;36";
|
||||||
strings = "0;33";
|
strings = "0;33";
|
||||||
arrays = "1;35";
|
arrays = "1;35";
|
||||||
objects = "1;37";
|
objects = "1;37";
|
||||||
|
objectKeys = "1;34";
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -63,6 +65,7 @@ in {
|
||||||
strings = "0;32";
|
strings = "0;32";
|
||||||
arrays = "1;37";
|
arrays = "1;37";
|
||||||
objects = "1;37";
|
objects = "1;37";
|
||||||
|
objectKeys = "1;34";
|
||||||
};
|
};
|
||||||
|
|
||||||
type = colorsType;
|
type = colorsType;
|
||||||
|
|
@ -76,7 +79,7 @@ in {
|
||||||
home.sessionVariables = let c = cfg.colors;
|
home.sessionVariables = let c = cfg.colors;
|
||||||
in {
|
in {
|
||||||
JQ_COLORS =
|
JQ_COLORS =
|
||||||
"${c.null}:${c.false}:${c.true}:${c.numbers}:${c.strings}:${c.arrays}:${c.objects}";
|
"${c.null}:${c.false}:${c.true}:${c.numbers}:${c.strings}:${c.arrays}:${c.objects}:${c.objectKeys}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue