.files/nix/homeModules/common/fish/aliasesAbbrs.nix
Léana 江 ebf8468807
tree-wide: format with nixfmt
Another saturday another useless formatter change.
It's my dotfiles, after all

alejandra doesn't handle c-style inline comments well.
2025-11-08 10:15:58 +08:00

31 lines
617 B
Nix

{
pkgs,
lib,
...
}:
{
programs.fish = {
shellAbbrs = lib.mkMerge [
(lib.mkIf pkgs.stdenv.isLinux {
"," = "nix-shell -p";
})
];
shellAliases = lib.mergeAttrsList [
{
rm = "rm -I"; # idiot protection
tree = "tree -Cph";
}
(lib.mkIf pkgs.stdenv.isLinux {
# idiot protection
chmod = "chmod --preserve-root";
chown = "chown --preserve-root";
# I can't make alias with a space, i.e. `nom shell`
nix-shell = "nix-shell --command fish";
nom-shell = "nom-shell --command fish";
})
];
};
}