asdf
asdf copied to clipboard
feat: Full compliance with XDG Base Directory Specification
Summary
This changes things so that:
-
ASDF_CONFIG_FILE
now defaults to$XDG_CONFIG_HOME/asdf/asdfrc
, if the old location doesn't exist -
ASDF_DIR
calculation is unchanged - only the installation procedures need to be changed -
ASDF_DATA_DIR
now defaults to"$XDG_STATE_HOME/asdf"
, if the old location doesn't exist- Breaking change: If
$HOME
was empty, then this changes the location of the install directory to the new default. This shouldn't affect anyone - people without correct$HOME
variables know what they are signing up for...
- Breaking change: If
-
Add undocumented arguments so things like completion scripts can reuse the logic without a whole bunch of code duplication
-
Each environment variable is exported so that they new values are automatically used by plugins. If plugins use the environment variables, everything should Just Work
What still needs to be done:
- Documentation changes
- Installation instructions / script to update to use
XDG_DATA_HOME
(for the git repository) (forASDF_DIR
) - Completion scripts to use the new location
- completions/_asdf shows an example of how it should be done for Fish, Bash, etc. completions
-
asdf.sh
use the new location - Fix weird issue with
$
showing up inPATH
when sourcingasdf.sh
(this could just be me)
Fixes #687