From 783da1d836304d3915f9e02bb9bda27369ec6b0c Mon Sep 17 00:00:00 2001 From: paki23 Date: Fri, 31 May 2024 00:07:18 +0200 Subject: [PATCH] eza: add xonsh integration --- modules/programs/eza.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/programs/eza.nix b/modules/programs/eza.nix index 7e002a12..be053584 100644 --- a/modules/programs/eza.nix +++ b/modules/programs/eza.nix @@ -37,6 +37,10 @@ with lib; default = true; }; + enableXonshIntegration = mkEnableOption "Xonsh integration" // { + default = true; + }; + enableNushellIntegration = mkEnableOption "Nushell integration"; extraOptions = mkOption { @@ -97,6 +101,18 @@ with lib; programs.ion.shellAliases = optionsAlias // optionalAttrs cfg.enableIonIntegration aliases; + programs.xonsh.shellAliases = { + eza = [ "eza" ] ++ optional cfg.icons "--icons" + ++ optional cfg.git "--git" ++ cfg.extraOptions; + } // optionalAttrs cfg.enableXonshIntegration + (builtins.mapAttrs (_name: value: lib.mkDefault value) { + ls = [ "eza" ]; + ll = [ "eza" "-l" ]; + la = [ "eza" "-a" ]; + lt = [ "eza" "--tree" ]; + lla = [ "eza" "-la" ]; + }); + programs.nushell.shellAliases = optionsAlias // optionalAttrs cfg.enableNushellIntegration aliases; };