diff --git a/modules/hm/default.nix b/modules/hm/default.nix index c73fc13..8073d38 100644 --- a/modules/hm/default.nix +++ b/modules/hm/default.nix @@ -50,6 +50,14 @@ in }; programs = { + # Switch to fish if bash is started interactively + bash.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 + ''; # Better cat (bat) bat = { enable = true;