--- share/config.fish.orig 2021-03-18 09:05:28.000000000 +0600 +++ share/config.fish 2021-04-04 13:57:03.000000000 +0600 @@ -96,6 +96,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 set -l local_path $PATH