Skip to content

feature: better user config home handling #20251

Closed
Closed
@etcusrvar

Description

@etcusrvar

Verification

Provide a detailed description of the proposed feature

Allow a user more options for their user config home directory.

I created a pull request with a proposed implementation.

What is the motivation for the feature?

On macOS and Linux, a user's only option for $HOMEBREW_USER_CONFIG_HOME is either the default ~/.homebrew, or $XDG_CONFIG_HOME/homebrew, but if and only if that variable is explicitly exported.
On Linux, the XDG spec says configuration should be under ~/.config if the variable is unset.
On macOS, configuration for many applications is under ~/Library/Application Support.
Some users do not like the proliferation and clutter of numerous files and directories in their $HOME directory.

How will the feature be relevant to at least 90% of Homebrew users?

Hopefully they'll like the options. The default will be to use ~/.homebrew so as not to break anything users are already using.

What alternatives to the feature have been considered?

  • Explicitly setting XDG_CONFIG_HOME in shell init scripts
  • Explicitly setting XDG_CONFIG_HOME in a wrapper script before calling brew
  • Symlinking ~/.homebrew to ~/.config/homebrew
  • Symlinking ~/.homebrew to ~/Library/Application Support/homebrew
  • Just using ~/.homebrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions