Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotenv plugin: agree once improvement #8729

Merged
merged 8 commits into from
Mar 23, 2020
Prev Previous commit
Next Next commit
refactor: fix code style
  • Loading branch information
Jędrzej Lewandowski committed Mar 10, 2020
commit 87c30ede39fd79e0e4f0938437779ac3cc86270b
10 changes: 5 additions & 5 deletions plugins/dotenv/dotenv.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ source_env() {
return
fi

if [[ "$confirmation" = [aA] ]]; then
echo "${dotenv_absolutepath}" >> "${ZSH_DOTENV_AGREE_LIST_FILE}"
fi
if [[ "$confirmation" = [aA] ]]; then
echo "${dotenv_absolutepath}" >> "${ZSH_DOTENV_AGREE_LIST_FILE}"
fi
fi
fi

Expand All @@ -41,11 +41,11 @@ autoload -U add-zsh-hook
add-zsh-hook chpwd source_env

if [[ -z $ZSH_DOTENV_FILE ]]; then
ZSH_DOTENV_FILE=.env
ZSH_DOTENV_FILE=.env
fi

if [[ -z $ZSH_DOTENV_AGREE_LIST_FILE ]]; then
ZSH_DOTENV_AGREE_LIST_FILE="${ZSH}/dotenv-agree.list"
ZSH_DOTENV_AGREE_LIST_FILE="${ZSH}/dotenv-agree.list"
fi

source_env
Expand Down