Skip to content

Commit

Permalink
Automatically source .env files
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio committed Aug 5, 2014
1 parent 79e61e2 commit bf35719
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ git.zsh: ~/.zsh/git.zsh
functions.zsh: ~/.zsh/functions.zsh
fasd.zsh: ~/.zsh/fasd.zsh
wakeonlan.zsh: ~/.zsh/wakeonlan.zsh
dotenv.zsh: ~/.zsh/dotenv.zsh
modules/zsh-completions: ~/.zsh/zsh-completions
modules/fasd: ~/.zsh/fasd
modules/prezto/modules/wakeonlan: ~/.zsh/wakeonlan
Expand Down
5 changes: 5 additions & 0 deletions dotenv.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function source_dotenv {
[[ -f $PWD/.env ]] && source $PWD/.env
}

chpwd_functions+=source_dotenv
1 change: 1 addition & 0 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ source ~/.zsh/git.zsh
source ~/.zsh/functions.zsh
source ~/.zsh/fasd.zsh
source ~/.zsh/wakeonlan.zsh
source ~/.zsh/dotenv.zsh
source ~/.zsh/keys.zsh

[[ -f "$HOME/.zshrc.local" ]] && source "$HOME/.zshrc.local"
Expand Down

0 comments on commit bf35719

Please sign in to comment.