diff options
author | Jay Weisskopf <jay@jayschwa.net> | 2013-12-10 12:52:04 -0500 |
---|---|---|
committer | Jay Weisskopf <jay@jayschwa.net> | 2013-12-10 12:52:04 -0500 |
commit | 9bbda857c33d25450c57f55842d733a0b185687e (patch) | |
tree | c7d9cb339aaa1689783aa63719f89e764e1b6d37 /share/config.fish | |
parent | 0e7acaa3c4676dca7204deae85c08c2b2e426bb9 (diff) |
Prepend user paths even if they already exist in system path
Fixes #1099
Diffstat (limited to 'share/config.fish')
-rw-r--r-- | share/config.fish | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/share/config.fish b/share/config.fish index 6b62a01c..5eac39bf 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 |