:tools direnv
Save (or destroy) the environment at your leisure
1. Description
This module integrates direnv into Emacs.
direnv is an environment switcher for the shell. It knows how to hook into bash, zsh, tcsh, fish shell and elvish to load or unload environment variables depending on the current directory. This allows project-specific environment variables without cluttering the ~/.profile file.
Before each prompt, direnv checks for the existence of a “.envrc” file in the current and parent directories. If the file exists (and is authorized), it is loaded into a bash sub-shell and all exported variables are then captured by direnv and then made available to the current shell.
1.1. Maintainers
1.2. Module flags
This module has no flags.
1.3. Packages
1.4. Hacks
- Normally, the direnv environment is updated on
post-command-hook
. We’ve changed it to update ondoom-switch-buffer-hook
,doom-switch-window-hook
anddoom-switch-frame-hook
instead. - Special direnv keywords/commands are highlighted in direnv-envrc-mode.
- A fix has been applied to ensure flycheck searches for executables from within the direnv environment, if any.
2. Prerequisites
This module requires direnv.
3. TODO Usage
This module has no usage documentation yet. Write some?
4. TODO Configuration
This module has no configuration documentation yet. Write some?
5. Troubleshooting
6. TODO Appendix
This module has no appendix yet. Write one?