mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
feat(dotenv): var to enable recusrive .env sourcing
This commit is contained in:
parent
27402e2603
commit
ab093439b5
2 changed files with 37 additions and 8 deletions
|
|
@ -78,6 +78,15 @@ change.
|
|||
NOTE: if a directory is found in both the allowed and disallowed lists, the disallowed list
|
||||
takes preference, _i.e._ the .env file will never be sourced.
|
||||
|
||||
### ZSH_DOTENV_RECURSIVE, ZSH_DOTENV_ROOT
|
||||
Set `ZSH_DOTENV_RECURSIVE=true` in your zshrc file to enable recursive search for the `ZSH_DOTENV_FILE` up to
|
||||
`ZSH_DOTENV_ROOT` (default `$HOME`) and source from `$ZSH_DOTENV_ROOT` to `$PWD`.
|
||||
|
||||
```zsh
|
||||
# in ~/.zshrc, before Oh My Zsh is sourced:
|
||||
ZSH_DOTENV_RECURSIVE=true
|
||||
ZSH_DOTENV_ROOT=/path/to/root
|
||||
```
|
||||
## Version Control
|
||||
|
||||
**It's strongly recommended to add `.env` file to `.gitignore`**, because usually it contains sensitive information such as your credentials, secret keys, passwords etc. You don't want to commit this file, it's supposed to be local only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue