From c5a6d0bfdef27c22e3293b50c1f2e568f8a1cc1f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 13 Feb 2019 12:35:15 +0100 Subject: [PATCH] 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. --- share/config.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/config.fish b/share/config.fish index 2aeb4fc7d..e3b6b1bd4 100644 --- a/share/config.fish +++ b/share/config.fish @@ -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