mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Split $fish_user_paths on ":" explicitly
It's used with $PATH, so it is _always_ split on ":". We could also force it to be a path variable, but that seems a bit overkill. Fixes #5594.
This commit is contained in:
parent
56309f1c2e
commit
c5a6d0bfde
1 changed files with 3 additions and 1 deletions
|
@ -102,7 +102,9 @@ function __fish_reconstruct_path -d "Update PATH when fish_user_paths changes" -
|
|||
|
||||
set -g __fish_added_user_paths
|
||||
if set -q fish_user_paths
|
||||
for x in $fish_user_paths[-1..1]
|
||||
# Explicitly split on ":" because $fish_user_paths might not be a path variable,
|
||||
# but $PATH definitely is.
|
||||
for x in (string split ":" -- $fish_user_paths[-1..1])
|
||||
if set -l idx (contains --index -- $x $local_path)
|
||||
set -e local_path[$idx]
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue