Skip to content

feat: adopt XDG Base Directory standard for config paths #422

Description

@chloe41427

Summary

Adopt the XDG Base Directory Specification for config file locations in the native CLI.

Motivation

Currently SDKMAN! stores its config at ~/.sdkman/etc/config. The XDG standard defines $XDG_CONFIG_HOME (defaulting to ~/.config) as the canonical location for user config files. Several community members have requested support for this — see sdkman-cli#1069 for prior art.

As part of the bash CLI rewrite, we plan to adopt XDG standards holistically. The native CLI should follow suit.

Requirements

  • Read user config from $XDG_CONFIG_HOME/sdkman/config (defaulting to ~/.config/sdkman/config)
  • Respect $XDG_DATA_HOME for data files (defaulting to ~/.local/share)
  • Maintain backwards compatibility with existing ~/.sdkman layout during a transition period
  • Follow precedence rules: XDG config overrides legacy config if both exist

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions