mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-29 16:51:15 -03:00
Remove scripted XDG_CONFIG_HOME uses
Cleaned up the code to no longer replicate in fishscript what fish already does (and caches to boot) in C++ in setting up the paths to the user configuration directory. Also introduced a `$__fish_user_data_dir` instead of the sporadic definitions of `$userdatadir` that may or may not go through `XDG_DATA_HOME`.
This commit is contained in:
@@ -21,12 +21,6 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||
set -g __fish_config_interactive_done
|
||||
set -g __fish_active_key_bindings
|
||||
|
||||
# Set the correct user data directory
|
||||
set -l userdatadir ~/.local/share
|
||||
if set -q XDG_DATA_HOME
|
||||
set userdatadir $XDG_DATA_HOME
|
||||
end
|
||||
|
||||
if not set -q fish_greeting
|
||||
set -l line1 (_ 'Welcome to fish, the friendly interactive shell')
|
||||
set -l line2 ''
|
||||
@@ -97,7 +91,7 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||
#
|
||||
# Don't do this if we're being invoked as part of running unit tests.
|
||||
if not set -q FISH_UNIT_TESTS_RUNNING
|
||||
if not test -d $userdatadir/fish/generated_completions
|
||||
if not test -d $__fish_user_data_dir/generated_completions
|
||||
# Generating completions from man pages needs python (see issue #3588).
|
||||
|
||||
# We cannot simply do `fish_update_completions &` because it is a function.
|
||||
|
||||
Reference in New Issue
Block a user