flocon/home/terminal/shell/fish.nix

35 lines
804 B
Nix
Raw Normal View History

{pkgs, ...}: {
2024-08-25 21:58:12 +02:00
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
fish_vi_key_bindings # Enable Vi mode
'';
2024-09-24 15:09:36 +02:00
shellAbbrs = {
cd = "z";
ngc = "sudo nix-collect-garbage -d";
};
plugins = [
{
name = "fzf";
2024-09-25 09:02:43 +02:00
inherit (pkgs.fishPlugins.fzf) src;
2024-09-24 15:09:36 +02:00
}
2024-11-01 09:49:09 +01:00
{
name = "autopair";
inherit (pkgs.fishPlugins.autopair) src;
}
2024-09-04 12:33:11 +02:00
];
2024-08-25 21:58:12 +02:00
};
programs.bash = {
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
2024-08-25 21:58:12 +02:00
}