Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for $HOME and some XDG variables inside the configuration file #2220

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

JoanVC100
Copy link
Contributor

This pull request tries to address issues #263 and #476.

With these changes you can use $HOME and some of the $XDG variables directly in the MPD configuration file. I used the functions in "fs/glue/StandardDirectory.hxx" to extract the XDG variables, so currently it's limited to:

  • XDG_CONFIG_HOME
  • XDG_MUSIC_DIR
  • XDG_CACHE_HOME
  • XDG_RUNTIME_DIR

@MaxKellermann
Copy link
Member

Your commit message is misleading - this is not about environment variables.
Also documentation is missing.

…tion file

This commit tries to address issues #263 and #476. It enables the path expansion of HOME, XDG_CONFIG_HOME, XDG_MUSIC_DIR, XDG_CACHE_HOME and XDG_RUNTIME_DIR by using the glue functions already available in MPD.

Signed-off-by: Joan Vilardaga <[email protected]>
@JoanVC100
Copy link
Contributor Author

Sorry for the premature closure, I am still learning about GitHub pull requests.

Anyway, I rewrote the commit message to make it more accurate. And I changed the documentation in both the man page and the HTML, as well as the example mpd.conf.

@JoanVC100 JoanVC100 changed the title Support for environment variable expansion Initial support for $HOME and some XDG variables inside the configuration file Mar 10, 2025
@MaxKellermann MaxKellermann merged commit e8ce417 into MusicPlayerDaemon:master Mar 11, 2025
@MaxKellermann
Copy link
Member

Thanks, that's good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants