Motivations
Files are currently placed directly in $HOME, which creates clutter. Using standard platform directories would improve system integration.
- Would you like to implement this feature? — Not sure.
Solution
-
Use directories crate with the following fallback order:
$XDG_DATA_HOME/espup
$HOME/.local/share/espup
$HOME/.espup
-
Add flag to optionally symlink export-esp.sh from $HOME to $XDG_DATA_HOME/espup/export-esp.sh
-
Create an extension-less version of the script with a shebang and export to $PATH - the $HOME symlink could point to this instead
Alternatives
- Add an environment variable to customize the location —
$ESP_HOME
Additional context
The directories crate provides cross-platform support for standard directory locations.