mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
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]
This commit is contained in:
parent
f04536637d
commit
d972623191
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue