mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 02:52:46 +08:00
Prepend user paths even if they already exist in system path
Fixes #1099
This commit is contained in:
parent
0e7acaa3c4
commit
9bbda857c3
|
@ -89,10 +89,12 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" -
|
||||||
|
|
||||||
set -e __fish_added_user_paths
|
set -e __fish_added_user_paths
|
||||||
for x in $fish_user_paths[-1..1]
|
for x in $fish_user_paths[-1..1]
|
||||||
if not contains $x $local_path
|
if set -l idx (contains --index $x $local_path)
|
||||||
set local_path $x $local_path
|
set -e local_path[$idx]
|
||||||
|
else
|
||||||
set -g __fish_added_user_paths $__fish_added_user_paths $x
|
set -g __fish_added_user_paths $__fish_added_user_paths $x
|
||||||
end
|
end
|
||||||
|
set local_path $x $local_path
|
||||||
end
|
end
|
||||||
set -xg PATH $local_path
|
set -xg PATH $local_path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user