Files
tldr/pages.zh/common/direnv.md

24 lines
508 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# direnv
> 一个Shell扩展根据当前目录加载和卸载环境变量。
> 更多信息:<https://github.com/direnv/direnv>。
- 授予direnv权限以加载当前目录中的`.envrc`
`direnv allow {{.}}`
- 撤销加载当前目录中的`.envrc`的授权:
`direnv deny {{.}}`
- 在默认文本编辑器中编辑`.envrc`文件,并在退出时重新加载环境:
`direnv edit {{.}}`
- 触发环境的重新加载:
`direnv reload`
- 打印一些调试状态信息:
`direnv status`