nushell is swell

This commit is contained in:
Matt Nish-Lapidus 2025-07-02 22:54:52 -04:00
parent e6f4e94c96
commit a06a8e2e2f
4 changed files with 13 additions and 12 deletions

View file

@ -352,11 +352,11 @@
# enable alternate shells and launch it from bash for interactive shells
programs.fish.enable = true;
# environment.pathsToLink = [ "/share/fish" ];
environment.pathsToLink = [ "/share/fish" ];
environment.shells = [ pkgs.nushell ];
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.nushell}/bin/nu $LOGIN_OPTION

View file

@ -145,15 +145,16 @@
package = pkgs.nh;
};
# enable fish and launch it from bash for interactive shells
# enable alternate shells and launch it from bash for interactive shells
programs.fish.enable = true;
environment.pathsToLink = [ "/share/fish" ];
environment.shells = [ pkgs.nushell ];
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
exec ${pkgs.nushell}/bin/nu $LOGIN_OPTION
fi
'';
};