Files
macports-ports/shells/fish3/files/patch-share_config_fish.diff
aeiouaeiouaeiouaeiouaeiouaeiou 881231e85b fish3: submission
2025-05-08 01:58:20 -04:00

25 lines
774 B
Diff

--- share/config.fish.orig
+++ share/config.fish
@@ -86,6 +86,21 @@
set -a fish_complete_path $__fish_data_dir/completions
end
+# MacPorts specific PATH setting, move ${prefix}/bin at PATH's head
+set MP_PREFIX @@PREFIX@@
+if contains $MP_PREFIX $PATH
+ set -e MP_PATH
+ for path_component in $PATH
+ if test $path_component != @@PREFIX@@
+ set MP_PATH $MP_PATH $path_component
+ end
+ end
+ set MP_PATH $MP_PREFIX $MP_PATH
+ set PATH $MP_PATH
+ set -e MP_PATH
+end
+set -e MP_PREFIX
+
# Add a handler for when fish_user_path changes, so we can apply the same changes to PATH
function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" --on-variable fish_user_paths
# Deduplicate $fish_user_paths