Skip to content

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

@erikw

Description

@erikw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions