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

direnv.toml(1) man page: Unclear configuration file path #928

Closed
erikw opened this issue Apr 14, 2022 · 1 comment
Closed

direnv.toml(1) man page: Unclear configuration file path #928

erikw opened this issue Apr 14, 2022 · 1 comment
Labels

Comments

@erikw
Copy link
Contributor

erikw commented Apr 14, 2022

Describe the bug
The current version of the direnv.toml man page

https://github.com/direnv/direnv/blob/71f904a8aa0476db7cfbca90ffbcf7bd84773f03/man/direnv.toml.1.md#description

says that the configuration file can be placed at CONFIGURATION_DIR/direnv.toml. Is CONFIGURARTION_DIR a standard envvar or direnv specific one? I think I've not heard about it before. The section then says

For many users, CONFIGURATION_DIR will be located at $HOME/.config/direnv/direnv.toml.

This is not a correct statement, because $HOME/.config/direnv/direnv.toml is a file path, not a dir path as indicated by the environment variable name.

Is $CONFIGURATION_DIR maybe an older environment variable that was used before the project scoped $DIRENV_CONFIG

Expected behavior
Either way there is a standard that should be used (XDG), no need to invent our own stuff!

The only thing that should be needed to say in the manual is to place your configuration file at

$XDG_CONFIG_HOME/direnv/direnv.toml

$CONFIGURATION_DIR and $DIRENV_CONFIG should probably be phased out, or at least keep only one of them for simplicity.

The good thing is that the direnv(1) manual is already using XDG paths:
https://github.com/direnv/direnv/blob/master/man/direnv.1.md#files

@zimbatm
Copy link
Member

zimbatm commented Apr 14, 2022

fixed!

@zimbatm zimbatm closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants