mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-05-11 05:55:17 +00:00
dotenv: add ZSH_DOTENV_PROMPT config (#8624)
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
source_env() {
|
||||
if [[ -f $ZSH_DOTENV_FILE ]]; then
|
||||
# confirm before sourcing .env file
|
||||
local confirmation
|
||||
echo -n "dotenv: source '$ZSH_DOTENV_FILE' file in the directory? (Y/n) "
|
||||
if read -k 1 confirmation && [[ $confirmation = [nN] ]]; then
|
||||
return
|
||||
|
||||
if [ "$ZSH_DOTENV_PROMPT" != "false" ]; then
|
||||
# confirm before sourcing file
|
||||
local confirmation
|
||||
echo -n "dotenv: source '$ZSH_DOTENV_FILE' file in the directory? (Y/n) "
|
||||
if read -k 1 confirmation && [[ $confirmation = [nN] ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
# test .env syntax
|
||||
|
||||
Reference in New Issue
Block a user