diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-07-25 21:01:02 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-07-25 21:01:02 -0600 |
commit | 1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c (patch) | |
tree | e6aeb9029206948167619f4dc1c2ec42c4040ab4 /plugins/dotenv/README.md | |
parent | 59344b5c59b7190ad3b14a2e8e02db8b5559141b (diff) | |
parent | 95218372402afc9aeafc89c0984310387ce79599 (diff) | |
download | zsh-1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c.tar.gz zsh-1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c.tar.bz2 zsh-1edd2c43b12f9f2c2ef04cfa0428db0f7fc0aa7c.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/dotenv/README.md')
-rw-r--r-- | plugins/dotenv/README.md | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/plugins/dotenv/README.md b/plugins/dotenv/README.md index f66124731..ab9d329f6 100644 --- a/plugins/dotenv/README.md +++ b/plugins/dotenv/README.md @@ -53,24 +53,30 @@ Set `ZSH_DOTENV_PROMPT=false` in your zshrc file if you don't want the confirmat You can also choose the `Always` option when prompted to always allow sourcing the .env file in that directory. See the next section for more details. -### ZSH_DOTENV_ALLOWED_LIST +### ZSH_DOTENV_ALLOWED_LIST, ZSH_DOTENV_DISALLOWED_LIST The default behavior of the plugin is to always ask whether to source a dotenv file. There's -a **Y**es, **N**o, and **A**lways option. If you choose Always, the directory of the .env file -will be added to an allowed list. If a directory is found in this list, the plugin won't ask -for confirmation and will instead source the .env file directly. +a **Y**es, **N**o, **A**lways and N**e**ver option. If you choose Always, the directory of the .env file +will be added to an allowed list; if you choose Never, it will be added to a disallowed list. +If a directory is found in either of those lists, the plugin won't ask for confirmation and will +instead either source the .env file or proceed without action respectively. -This allowed list is saved by default in `$ZSH_CACHE_DIR/dotenv-allowed.list`. If you want -to change that location, change the `$ZSH_DOTENV_ALLOWED_LIST` variable, like so: +The allowed and disallowed lists are saved by default in `$ZSH_CACHE_DIR/dotenv-allowed.list` and +`$ZSH_CACHE_DIR/dotenv-disallowed.list` respectively. If you want to change that location, +change the `$ZSH_DOTENV_ALLOWED_LIST` and `$ZSH_DOTENV_DISALLOWED_LIST` variables, like so: ```zsh # in ~/.zshrc, before Oh My Zsh is sourced: ZSH_DOTENV_ALLOWED_LIST=/path/to/dotenv/allowed/list +ZSH_DOTENV_DISALLOWED_LIST=/path/to/dotenv/disallowed/list ``` -This file is just a list of directories allowed, separated by a newline character. If you want -to disallow a directory, just edit this file and remove the line for the directory you want to -disallow. +The file is just a list of directories, separated by a newline character. If you want +to change your decision, just edit the file and remove the line for the directory you want to +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. ## Version Control |