1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 00:39:45 +01:00

eza: add color option

This commit is contained in:
nyadiia 2024-10-23 16:35:08 -05:00 committed by Robert Helgesson
parent c0e2315987
commit 0c0268a3c8
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -59,6 +59,14 @@ with lib;
''; '';
}; };
colors = mkOption {
type = types.enum [ null "auto" "always" "never" ];
default = null;
description = ''
Use terminal colors in output ({option}`--color` argument).
'';
};
git = mkOption { git = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -80,8 +88,9 @@ with lib;
cfg.icons; cfg.icons;
in optionals (v != null) [ "--icons" v ]; in optionals (v != null) [ "--icons" v ];
args = escapeShellArgs args = escapeShellArgs (iconsOption
(iconsOption ++ optional cfg.git "--git" ++ cfg.extraOptions); ++ optionals (cfg.colors != null) [ "--color" cfg.colors ]
++ optional cfg.git "--git" ++ cfg.extraOptions);
optionsAlias = optionalAttrs (args != "") { eza = "eza ${args}"; }; optionsAlias = optionalAttrs (args != "") { eza = "eza ${args}"; };