Skip to content

Commit

Permalink
eza: add color option
Browse files Browse the repository at this point in the history
  • Loading branch information
nyadiia authored and rycee committed Oct 25, 2024
1 parent c0e2315 commit 0c0268a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions modules/programs/eza.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
type = types.bool;
default = false;
Expand All @@ -80,8 +88,9 @@ with lib;
cfg.icons;
in optionals (v != null) [ "--icons" v ];

args = escapeShellArgs
(iconsOption ++ optional cfg.git "--git" ++ cfg.extraOptions);
args = escapeShellArgs (iconsOption
++ optionals (cfg.colors != null) [ "--color" cfg.colors ]
++ optional cfg.git "--git" ++ cfg.extraOptions);

optionsAlias = optionalAttrs (args != "") { eza = "eza ${args}"; };

Expand Down

0 comments on commit 0c0268a

Please sign in to comment.