diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index bbfe96989..654c43fca 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -119,7 +119,7 @@ in { programs.fish.${initFish} = mkIf cfg.enableFishIntegration '' if test "$TERM" != "dumb" - eval (${starshipCmd} init fish) + ${starshipCmd} init fish | source ${lib.optionalString cfg.enableTransience "enable_transience"} end ''; diff --git a/tests/modules/programs/starship/fish_without_interactive.nix b/tests/modules/programs/starship/fish_without_interactive.nix index eeafb47e1..0ec8f9646 100644 --- a/tests/modules/programs/starship/fish_without_interactive.nix +++ b/tests/modules/programs/starship/fish_without_interactive.nix @@ -19,7 +19,7 @@ with lib; export GOT="$(tail -n 5 `_abs home-files/.config/fish/config.fish`)" export EXPECTED=" if test \"\$TERM\" != dumb - eval (/home/hm-user/.nix-profile/bin/starship init fish) + /home/hm-user/.nix-profile/bin/starship init fish | source end"