feat(hm): run fish if bash is started interactively
Setting `fish` as the login shell causes issues, this is safer to do.
This commit is contained in:
parent
3ad83d4fd7
commit
c50d16b93f
1 changed files with 8 additions and 0 deletions
|
@ -50,6 +50,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
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)
|
# Better cat (bat)
|
||||||
bat = {
|
bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue