1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

feat: differentiate between fish aliases and abbrs

This commit is contained in:
Ryan Cao 2023-07-21 17:13:54 +08:00
parent f024302352
commit d96f478fa2
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
3 changed files with 30 additions and 15 deletions

View file

@ -1,7 +1,11 @@
{...}: {
{lib, ...}: let
aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases);
shellAliases = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases);
in {
programs.fish = {
enable = true;
shellAbbrs = import ./aliases.nix;
inherit shellAbbrs shellAliases;
};
home.file.".config/fish/conf.d" = {