1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

z-lua: add support for fish abbreviations

This commit is contained in:
Heitor Augusto 2024-09-13 13:56:28 -03:00 committed by Robert Helgesson
parent 0d118885b2
commit c6e4ec39df
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -77,16 +77,26 @@ in {
})"
'';
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
source (${pkgs.z-lua}/bin/z --init fish ${
concatStringsSep " " cfg.options
} | psub)
'';
programs.bash.shellAliases = mkIf cfg.enableAliases aliases;
programs.zsh.shellAliases = mkIf cfg.enableAliases aliases;
programs.fish.shellAliases = mkIf cfg.enableAliases aliases;
programs.fish = mkMerge [
{
shellInit = mkIf cfg.enableFishIntegration ''
source (${pkgs.z-lua}/bin/z --init fish ${
concatStringsSep " " cfg.options
} | psub)
'';
}
(mkIf (!config.programs.fish.preferAbbrs) {
shellAliases = mkIf cfg.enableAliases aliases;
})
(mkIf config.programs.fish.preferAbbrs {
shellAbbrs = mkIf cfg.enableAliases aliases;
})
];
};
}