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.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
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;
|
||||
arrays = colorType;
|
||||
objects = colorType;
|
||||
objectKeys = colorType;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ in {
|
|||
strings = "0;33";
|
||||
arrays = "1;35";
|
||||
objects = "1;37";
|
||||
objectKeys = "1;34";
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
@ -63,6 +65,7 @@ in {
|
|||
strings = "0;32";
|
||||
arrays = "1;37";
|
||||
objects = "1;37";
|
||||
objectKeys = "1;34";
|
||||
};
|
||||
|
||||
type = colorsType;
|
||||
|
|
@ -76,7 +79,7 @@ in {
|
|||
home.sessionVariables = let c = cfg.colors;
|
||||
in {
|
||||
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