diff --git a/scripts/nix-profile-daemon.fish.in b/scripts/nix-profile-daemon.fish.in index 3fb7271510a..fffa06293e1 100644 --- a/scripts/nix-profile-daemon.fish.in +++ b/scripts/nix-profile-daemon.fish.in @@ -1,17 +1,16 @@ # Only execute this file once per shell. -if test -z "$HOME" || \ - test -n "$__ETC_PROFILE_NIX_SOURCED" +if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED" exit end -set --global __ETC_PROFILE_NIX_SOURCED 1 +set --global --export __ETC_PROFILE_NIX_SOURCED 1 # Local helpers function add_path --argument-names new_path if type -q fish_add_path # fish 3.2.0 or newer - fish_add_path --prepend --global $new_path + fish_add_path --prepend --global $new_path else # older versions of fish if not contains $new_path $fish_user_paths diff --git a/scripts/nix-profile.fish.in b/scripts/nix-profile.fish.in index 3fb7271510a..fffa06293e1 100644 --- a/scripts/nix-profile.fish.in +++ b/scripts/nix-profile.fish.in @@ -1,17 +1,16 @@ # Only execute this file once per shell. -if test -z "$HOME" || \ - test -n "$__ETC_PROFILE_NIX_SOURCED" +if test -z "$HOME" || test -n "$__ETC_PROFILE_NIX_SOURCED" exit end -set --global __ETC_PROFILE_NIX_SOURCED 1 +set --global --export __ETC_PROFILE_NIX_SOURCED 1 # Local helpers function add_path --argument-names new_path if type -q fish_add_path # fish 3.2.0 or newer - fish_add_path --prepend --global $new_path + fish_add_path --prepend --global $new_path else # older versions of fish if not contains $new_path $fish_user_paths