dotenv.plugin.zsh 131 Bytes
Newer Older
Arthur's avatar
Arthur committed
1
2
3
4
5
6
7
8
9
10
#!/bin/zsh

source_env() {
  if [[ -f .env ]]; then
    source .env
  fi
}

autoload -U add-zsh-hook
add-zsh-hook chpwd source_env