From 9bbda857c33d25450c57f55842d733a0b185687e Mon Sep 17 00:00:00 2001 From: Jay Weisskopf Date: Tue, 10 Dec 2013 12:52:04 -0500 Subject: [PATCH] Prepend user paths even if they already exist in system path Fixes #1099 --- share/config.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/config.fish b/share/config.fish index 6b62a01c3..5eac39bf3 100644 --- a/share/config.fish +++ b/share/config.fish @@ -89,10 +89,12 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" - set -e __fish_added_user_paths for x in $fish_user_paths[-1..1] - if not contains $x $local_path - set local_path $x $local_path + if set -l idx (contains --index $x $local_path) + set -e local_path[$idx] + else set -g __fish_added_user_paths $__fish_added_user_paths $x end + set local_path $x $local_path end set -xg PATH $local_path end