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:
parent
c0e2315987
commit
0c0268a3c8
1 changed files with 11 additions and 2 deletions
|
@ -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}"; };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue