Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions scripts/nix-profile-daemon.fish.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ 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
else
# older versions of fish
if not contains $new_path $fish_user_paths
set --global fish_user_paths $new_path $fish_user_paths
end
# Directly manipulate PATH to avoid conflicts with user's fish_user_paths
if not contains $new_path $PATH
set --global --export --prepend PATH $new_path
end
end

Expand Down
11 changes: 3 additions & 8 deletions scripts/nix-profile.fish.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ 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
else
# older versions of fish
if not contains $new_path $fish_user_paths
set --global fish_user_paths $new_path $fish_user_paths
end
# Directly manipulate PATH to avoid conflicts with user's fish_user_paths
if not contains $new_path $PATH
set --global --export --prepend PATH $new_path
end
end

Expand Down