From d972623191e9e55fa8cbdaaafe288370cdbbad7c Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 19 Jan 2020 09:21:53 +0100 Subject: [PATCH] Fix vendor paths without $XDG_DATA_DIRS We'd use $__fish_data_dir, but that already had the "/fish" component, and then we'd add it again later, so we would try to find vendor functions in places like /usr/share/fish/fish/vendor_functions.d which obviously don't exist. Instead let's add the "/fish" component to the xdg dirs early, which also saves us from having to repeat it later. Fixes #6428 See #6508 [ci skip] --- share/config.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/config.fish b/share/config.fish index 15fded78b..400556832 100644 --- a/share/config.fish +++ b/share/config.fish @@ -71,14 +71,14 @@ end set -l xdg_data_dirs if set -q XDG_DATA_DIRS set --path xdg_data_dirs $XDG_DATA_DIRS - set xdg_data_dirs (string replace -r '([^/])/$' '$1' -- $xdg_data_dirs) + set xdg_data_dirs (string replace -r '([^/])/$' '$1' -- $xdg_data_dirs)/fish else set xdg_data_dirs $__fish_data_dir end -set -l vendor_completionsdirs $xdg_data_dirs/fish/vendor_completions.d -set -l vendor_functionsdirs $xdg_data_dirs/fish/vendor_functions.d -set -l vendor_confdirs $xdg_data_dirs/fish/vendor_conf.d +set -l vendor_completionsdirs $xdg_data_dirs/vendor_completions.d +set -l vendor_functionsdirs $xdg_data_dirs/vendor_functions.d +set -l vendor_confdirs $xdg_data_dirs/vendor_conf.d # Ensure that extra directories are always included. if not contains -- $__extra_completionsdir $vendor_completionsdirs